proteus  1.2.0
C/C++/Fortran libraries
ADR.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.25.2 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
8  #error Cython requires Python 2.6+ or Python 3.2+.
9 #else
10 #define CYTHON_ABI "0_25_2"
11 #include <stddef.h>
12 #ifndef offsetof
13  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
14 #endif
15 #if !defined(WIN32) && !defined(MS_WINDOWS)
16  #ifndef __stdcall
17  #define __stdcall
18  #endif
19  #ifndef __cdecl
20  #define __cdecl
21  #endif
22  #ifndef __fastcall
23  #define __fastcall
24  #endif
25 #endif
26 #ifndef DL_IMPORT
27  #define DL_IMPORT(t) t
28 #endif
29 #ifndef DL_EXPORT
30  #define DL_EXPORT(t) t
31 #endif
32 #ifndef HAVE_LONG_LONG
33  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
34  #define HAVE_LONG_LONG
35  #endif
36 #endif
37 #ifndef PY_LONG_LONG
38  #define PY_LONG_LONG LONG_LONG
39 #endif
40 #ifndef Py_HUGE_VAL
41  #define Py_HUGE_VAL HUGE_VAL
42 #endif
43 #ifdef PYPY_VERSION
44  #define CYTHON_COMPILING_IN_PYPY 1
45  #define CYTHON_COMPILING_IN_PYSTON 0
46  #define CYTHON_COMPILING_IN_CPYTHON 0
47  #undef CYTHON_USE_TYPE_SLOTS
48  #define CYTHON_USE_TYPE_SLOTS 0
49  #undef CYTHON_USE_ASYNC_SLOTS
50  #define CYTHON_USE_ASYNC_SLOTS 0
51  #undef CYTHON_USE_PYLIST_INTERNALS
52  #define CYTHON_USE_PYLIST_INTERNALS 0
53  #undef CYTHON_USE_UNICODE_INTERNALS
54  #define CYTHON_USE_UNICODE_INTERNALS 0
55  #undef CYTHON_USE_UNICODE_WRITER
56  #define CYTHON_USE_UNICODE_WRITER 0
57  #undef CYTHON_USE_PYLONG_INTERNALS
58  #define CYTHON_USE_PYLONG_INTERNALS 0
59  #undef CYTHON_AVOID_BORROWED_REFS
60  #define CYTHON_AVOID_BORROWED_REFS 1
61  #undef CYTHON_ASSUME_SAFE_MACROS
62  #define CYTHON_ASSUME_SAFE_MACROS 0
63  #undef CYTHON_UNPACK_METHODS
64  #define CYTHON_UNPACK_METHODS 0
65  #undef CYTHON_FAST_THREAD_STATE
66  #define CYTHON_FAST_THREAD_STATE 0
67  #undef CYTHON_FAST_PYCALL
68  #define CYTHON_FAST_PYCALL 0
69 #elif defined(PYSTON_VERSION)
70  #define CYTHON_COMPILING_IN_PYPY 0
71  #define CYTHON_COMPILING_IN_PYSTON 1
72  #define CYTHON_COMPILING_IN_CPYTHON 0
73  #ifndef CYTHON_USE_TYPE_SLOTS
74  #define CYTHON_USE_TYPE_SLOTS 1
75  #endif
76  #undef CYTHON_USE_ASYNC_SLOTS
77  #define CYTHON_USE_ASYNC_SLOTS 0
78  #undef CYTHON_USE_PYLIST_INTERNALS
79  #define CYTHON_USE_PYLIST_INTERNALS 0
80  #ifndef CYTHON_USE_UNICODE_INTERNALS
81  #define CYTHON_USE_UNICODE_INTERNALS 1
82  #endif
83  #undef CYTHON_USE_UNICODE_WRITER
84  #define CYTHON_USE_UNICODE_WRITER 0
85  #undef CYTHON_USE_PYLONG_INTERNALS
86  #define CYTHON_USE_PYLONG_INTERNALS 0
87  #ifndef CYTHON_AVOID_BORROWED_REFS
88  #define CYTHON_AVOID_BORROWED_REFS 0
89  #endif
90  #ifndef CYTHON_ASSUME_SAFE_MACROS
91  #define CYTHON_ASSUME_SAFE_MACROS 1
92  #endif
93  #ifndef CYTHON_UNPACK_METHODS
94  #define CYTHON_UNPACK_METHODS 1
95  #endif
96  #undef CYTHON_FAST_THREAD_STATE
97  #define CYTHON_FAST_THREAD_STATE 0
98  #undef CYTHON_FAST_PYCALL
99  #define CYTHON_FAST_PYCALL 0
100 #else
101  #define CYTHON_COMPILING_IN_PYPY 0
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 1
104  #ifndef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 1
106  #endif
107  #if PY_MAJOR_VERSION < 3
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #if PY_VERSION_HEX < 0x02070000
114  #undef CYTHON_USE_PYLONG_INTERNALS
115  #define CYTHON_USE_PYLONG_INTERNALS 0
116  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
117  #define CYTHON_USE_PYLONG_INTERNALS 1
118  #endif
119  #ifndef CYTHON_USE_PYLIST_INTERNALS
120  #define CYTHON_USE_PYLIST_INTERNALS 1
121  #endif
122  #ifndef CYTHON_USE_UNICODE_INTERNALS
123  #define CYTHON_USE_UNICODE_INTERNALS 1
124  #endif
125  #if PY_VERSION_HEX < 0x030300F0
126  #undef CYTHON_USE_UNICODE_WRITER
127  #define CYTHON_USE_UNICODE_WRITER 0
128  #elif !defined(CYTHON_USE_UNICODE_WRITER)
129  #define CYTHON_USE_UNICODE_WRITER 1
130  #endif
131  #ifndef CYTHON_AVOID_BORROWED_REFS
132  #define CYTHON_AVOID_BORROWED_REFS 0
133  #endif
134  #ifndef CYTHON_ASSUME_SAFE_MACROS
135  #define CYTHON_ASSUME_SAFE_MACROS 1
136  #endif
137  #ifndef CYTHON_UNPACK_METHODS
138  #define CYTHON_UNPACK_METHODS 1
139  #endif
140  #ifndef CYTHON_FAST_THREAD_STATE
141  #define CYTHON_FAST_THREAD_STATE 1
142  #endif
143  #ifndef CYTHON_FAST_PYCALL
144  #define CYTHON_FAST_PYCALL 1
145  #endif
146 #endif
147 #if !defined(CYTHON_FAST_PYCCALL)
148 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
149 #endif
150 #if CYTHON_USE_PYLONG_INTERNALS
151  #include "longintrepr.h"
152  #undef SHIFT
153  #undef BASE
154  #undef MASK
155 #endif
156 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
157  #define Py_OptimizeFlag 0
158 #endif
159 #define __PYX_BUILD_PY_SSIZE_T "n"
160 #define CYTHON_FORMAT_SSIZE_T "z"
161 #if PY_MAJOR_VERSION < 3
162  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
163  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
164  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
165  #define __Pyx_DefaultClassType PyClass_Type
166 #else
167  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
168  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
169  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
170  #define __Pyx_DefaultClassType PyType_Type
171 #endif
172 #ifndef Py_TPFLAGS_CHECKTYPES
173  #define Py_TPFLAGS_CHECKTYPES 0
174 #endif
175 #ifndef Py_TPFLAGS_HAVE_INDEX
176  #define Py_TPFLAGS_HAVE_INDEX 0
177 #endif
178 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
179  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
180 #endif
181 #ifndef Py_TPFLAGS_HAVE_FINALIZE
182  #define Py_TPFLAGS_HAVE_FINALIZE 0
183 #endif
184 #ifndef METH_FASTCALL
185  #define METH_FASTCALL 0x80
186  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
187  Py_ssize_t nargs, PyObject *kwnames);
188 #else
189  #define __Pyx_PyCFunctionFast _PyCFunctionFast
190 #endif
191 #if CYTHON_FAST_PYCCALL
192 #define __Pyx_PyFastCFunction_Check(func)\
193  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
194 #else
195 #define __Pyx_PyFastCFunction_Check(func) 0
196 #endif
197 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
198  #define CYTHON_PEP393_ENABLED 1
199  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
200  0 : _PyUnicode_Ready((PyObject *)(op)))
201  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
202  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
203  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
204  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
205  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
206  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
207  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
208  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
209 #else
210  #define CYTHON_PEP393_ENABLED 0
211  #define PyUnicode_1BYTE_KIND 1
212  #define PyUnicode_2BYTE_KIND 2
213  #define PyUnicode_4BYTE_KIND 4
214  #define __Pyx_PyUnicode_READY(op) (0)
215  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
216  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
217  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
218  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
219  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
220  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
221  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
222  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
223 #endif
224 #if CYTHON_COMPILING_IN_PYPY
225  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
226  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
227 #else
228  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
229  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
230  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
231 #endif
232 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
233  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
234 #endif
235 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
236  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
237 #endif
238 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
239  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
240 #endif
241 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
242  #define PyObject_Malloc(s) PyMem_Malloc(s)
243  #define PyObject_Free(p) PyMem_Free(p)
244  #define PyObject_Realloc(p) PyMem_Realloc(p)
245 #endif
246 #if CYTHON_COMPILING_IN_PYSTON
247  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
248  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
249 #else
250  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
251  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
252 #endif
253 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
254 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
255 #if PY_MAJOR_VERSION >= 3
256  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
257 #else
258  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
259 #endif
260 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
261  #define PyObject_ASCII(o) PyObject_Repr(o)
262 #endif
263 #if PY_MAJOR_VERSION >= 3
264  #define PyBaseString_Type PyUnicode_Type
265  #define PyStringObject PyUnicodeObject
266  #define PyString_Type PyUnicode_Type
267  #define PyString_Check PyUnicode_Check
268  #define PyString_CheckExact PyUnicode_CheckExact
269 #endif
270 #if PY_MAJOR_VERSION >= 3
271  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
272  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
273 #else
274  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
275  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
276 #endif
277 #ifndef PySet_CheckExact
278  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
279 #endif
280 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
281 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
282 #if PY_MAJOR_VERSION >= 3
283  #define PyIntObject PyLongObject
284  #define PyInt_Type PyLong_Type
285  #define PyInt_Check(op) PyLong_Check(op)
286  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
287  #define PyInt_FromString PyLong_FromString
288  #define PyInt_FromUnicode PyLong_FromUnicode
289  #define PyInt_FromLong PyLong_FromLong
290  #define PyInt_FromSize_t PyLong_FromSize_t
291  #define PyInt_FromSsize_t PyLong_FromSsize_t
292  #define PyInt_AsLong PyLong_AsLong
293  #define PyInt_AS_LONG PyLong_AS_LONG
294  #define PyInt_AsSsize_t PyLong_AsSsize_t
295  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
296  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
297  #define PyNumber_Int PyNumber_Long
298 #endif
299 #if PY_MAJOR_VERSION >= 3
300  #define PyBoolObject PyLongObject
301 #endif
302 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
303  #ifndef PyUnicode_InternFromString
304  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
305  #endif
306 #endif
307 #if PY_VERSION_HEX < 0x030200A4
308  typedef long Py_hash_t;
309  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
310  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
311 #else
312  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
313  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
314 #endif
315 #if PY_MAJOR_VERSION >= 3
316  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
317 #else
318  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
319 #endif
320 #if CYTHON_USE_ASYNC_SLOTS
321  #if PY_VERSION_HEX >= 0x030500B1
322  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
323  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
324  #else
325  typedef struct {
326  unaryfunc am_await;
327  unaryfunc am_aiter;
328  unaryfunc am_anext;
329  } __Pyx_PyAsyncMethodsStruct;
330  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
331  #endif
332 #else
333  #define __Pyx_PyType_AsAsync(obj) NULL
334 #endif
335 #ifndef CYTHON_RESTRICT
336  #if defined(__GNUC__)
337  #define CYTHON_RESTRICT __restrict__
338  #elif defined(_MSC_VER) && _MSC_VER >= 1400
339  #define CYTHON_RESTRICT __restrict
340  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
341  #define CYTHON_RESTRICT restrict
342  #else
343  #define CYTHON_RESTRICT
344  #endif
345 #endif
346 #ifndef CYTHON_UNUSED
347 # if defined(__GNUC__)
348 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
349 # define CYTHON_UNUSED __attribute__ ((__unused__))
350 # else
351 # define CYTHON_UNUSED
352 # endif
353 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
354 # define CYTHON_UNUSED __attribute__ ((__unused__))
355 # else
356 # define CYTHON_UNUSED
357 # endif
358 #endif
359 #ifndef CYTHON_MAYBE_UNUSED_VAR
360 # if defined(__cplusplus)
361  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
362 # else
363 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
364 # endif
365 #endif
366 #ifndef CYTHON_NCP_UNUSED
367 # if CYTHON_COMPILING_IN_CPYTHON
368 # define CYTHON_NCP_UNUSED
369 # else
370 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
371 # endif
372 #endif
373 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
374 
375 #ifndef __cplusplus
376  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
377 #endif
378 #ifndef CYTHON_INLINE
379  #if defined(__clang__)
380  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
381  #else
382  #define CYTHON_INLINE inline
383  #endif
384 #endif
385 template<typename T>
386 void __Pyx_call_destructor(T& x) {
387  x.~T();
388 }
389 template<typename T>
390 class __Pyx_FakeReference {
391  public:
392  __Pyx_FakeReference() : ptr(NULL) { }
393  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
394  T *operator->() { return ptr; }
395  T *operator&() { return ptr; }
396  operator T&() { return *ptr; }
397  template<typename U> bool operator ==(U other) { return *ptr == other; }
398  template<typename U> bool operator !=(U other) { return *ptr != other; }
399  private:
400  T *ptr;
401 };
402 
403 #if defined(WIN32) || defined(MS_WINDOWS)
404  #define _USE_MATH_DEFINES
405 #endif
406 #include <math.h>
407 #ifdef NAN
408 #define __PYX_NAN() ((float) NAN)
409 #else
410 static CYTHON_INLINE float __PYX_NAN() {
411  float value;
412  memset(&value, 0xFF, sizeof(value));
413  return value;
414 }
415 #endif
416 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
417 #define __Pyx_truncl trunc
418 #else
419 #define __Pyx_truncl truncl
420 #endif
421 
422 
423 #define __PYX_ERR(f_index, lineno, Ln_error) \
424 { \
425  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
426 }
427 
428 #if PY_MAJOR_VERSION >= 3
429  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
430  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
431 #else
432  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
433  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
434 #endif
435 
436 #ifndef __PYX_EXTERN_C
437  #ifdef __cplusplus
438  #define __PYX_EXTERN_C extern "C"
439  #else
440  #define __PYX_EXTERN_C extern
441  #endif
442 #endif
443 
444 #define __PYX_HAVE__ADR
445 #define __PYX_HAVE_API__ADR
446 #include <string.h>
447 #include <stdio.h>
448 #include <stdlib.h>
449 #include "numpy/arrayobject.h"
450 #include "numpy/ufuncobject.h"
451 #include "ADR.h"
452 #ifdef _OPENMP
453 #include <omp.h>
454 #endif /* _OPENMP */
455 
456 #ifdef PYREX_WITHOUT_ASSERTIONS
457 #define CYTHON_WITHOUT_ASSERTIONS
458 #endif
459 
460 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
461  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
462 
463 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
464 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
465 #define __PYX_DEFAULT_STRING_ENCODING ""
466 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
467 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
468 #define __Pyx_uchar_cast(c) ((unsigned char)c)
469 #define __Pyx_long_cast(x) ((long)x)
470 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
471  (sizeof(type) < sizeof(Py_ssize_t)) ||\
472  (sizeof(type) > sizeof(Py_ssize_t) &&\
473  likely(v < (type)PY_SSIZE_T_MAX ||\
474  v == (type)PY_SSIZE_T_MAX) &&\
475  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
476  v == (type)PY_SSIZE_T_MIN))) ||\
477  (sizeof(type) == sizeof(Py_ssize_t) &&\
478  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
479  v == (type)PY_SSIZE_T_MAX))) )
480 #if defined (__cplusplus) && __cplusplus >= 201103L
481  #include <cstdlib>
482  #define __Pyx_sst_abs(value) std::abs(value)
483 #elif SIZEOF_INT >= SIZEOF_SIZE_T
484  #define __Pyx_sst_abs(value) abs(value)
485 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
486  #define __Pyx_sst_abs(value) labs(value)
487 #elif defined (_MSC_VER) && defined (_M_X64)
488  #define __Pyx_sst_abs(value) _abs64(value)
489 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
490  #define __Pyx_sst_abs(value) llabs(value)
491 #elif defined (__GNUC__)
492  #define __Pyx_sst_abs(value) __builtin_llabs(value)
493 #else
494  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
495 #endif
496 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
497 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
498 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
499 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
500 #define __Pyx_PyBytes_FromString PyBytes_FromString
501 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
502 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
503 #if PY_MAJOR_VERSION < 3
504  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
505  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
506 #else
507  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
508  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
509 #endif
510 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
511 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
512 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
513 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
514 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
515 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
516 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
517 #if PY_MAJOR_VERSION < 3
518 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
519 {
520  const Py_UNICODE *u_end = u;
521  while (*u_end++) ;
522  return (size_t)(u_end - u - 1);
523 }
524 #else
525 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
526 #endif
527 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
528 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
529 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
530 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
531 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
532 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
533 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
534 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
535 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
536 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
537 #if CYTHON_ASSUME_SAFE_MACROS
538 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
539 #else
540 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
541 #endif
542 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
543 #if PY_MAJOR_VERSION >= 3
544 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
545 #else
546 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
547 #endif
548 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
549 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
550 static int __Pyx_sys_getdefaultencoding_not_ascii;
551 static int __Pyx_init_sys_getdefaultencoding_params(void) {
552  PyObject* sys;
553  PyObject* default_encoding = NULL;
554  PyObject* ascii_chars_u = NULL;
555  PyObject* ascii_chars_b = NULL;
556  const char* default_encoding_c;
557  sys = PyImport_ImportModule("sys");
558  if (!sys) goto bad;
559  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
560  Py_DECREF(sys);
561  if (!default_encoding) goto bad;
562  default_encoding_c = PyBytes_AsString(default_encoding);
563  if (!default_encoding_c) goto bad;
564  if (strcmp(default_encoding_c, "ascii") == 0) {
565  __Pyx_sys_getdefaultencoding_not_ascii = 0;
566  } else {
567  char ascii_chars[128];
568  int c;
569  for (c = 0; c < 128; c++) {
570  ascii_chars[c] = c;
571  }
572  __Pyx_sys_getdefaultencoding_not_ascii = 1;
573  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
574  if (!ascii_chars_u) goto bad;
575  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
576  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
577  PyErr_Format(
578  PyExc_ValueError,
579  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
580  default_encoding_c);
581  goto bad;
582  }
583  Py_DECREF(ascii_chars_u);
584  Py_DECREF(ascii_chars_b);
585  }
586  Py_DECREF(default_encoding);
587  return 0;
588 bad:
589  Py_XDECREF(default_encoding);
590  Py_XDECREF(ascii_chars_u);
591  Py_XDECREF(ascii_chars_b);
592  return -1;
593 }
594 #endif
595 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
596 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
597 #else
598 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
599 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
600 static char* __PYX_DEFAULT_STRING_ENCODING;
601 static int __Pyx_init_sys_getdefaultencoding_params(void) {
602  PyObject* sys;
603  PyObject* default_encoding = NULL;
604  char* default_encoding_c;
605  sys = PyImport_ImportModule("sys");
606  if (!sys) goto bad;
607  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
608  Py_DECREF(sys);
609  if (!default_encoding) goto bad;
610  default_encoding_c = PyBytes_AsString(default_encoding);
611  if (!default_encoding_c) goto bad;
612  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
613  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
614  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
615  Py_DECREF(default_encoding);
616  return 0;
617 bad:
618  Py_XDECREF(default_encoding);
619  return -1;
620 }
621 #endif
622 #endif
623 
624 
625 /* Test for GCC > 2.95 */
626 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
627  #define likely(x) __builtin_expect(!!(x), 1)
628  #define unlikely(x) __builtin_expect(!!(x), 0)
629 #else /* !__GNUC__ or GCC < 2.95 */
630  #define likely(x) (x)
631  #define unlikely(x) (x)
632 #endif /* __GNUC__ */
633 
634 static PyObject *__pyx_m;
635 static PyObject *__pyx_d;
636 static PyObject *__pyx_b;
637 static PyObject *__pyx_empty_tuple;
638 static PyObject *__pyx_empty_bytes;
639 static PyObject *__pyx_empty_unicode;
640 static int __pyx_lineno;
641 static int __pyx_clineno = 0;
642 static const char * __pyx_cfilenm= __FILE__;
643 static const char *__pyx_filename;
644 
645 /* Header.proto */
646 #if !defined(CYTHON_CCOMPLEX)
647  #if defined(__cplusplus)
648  #define CYTHON_CCOMPLEX 1
649  #elif defined(_Complex_I)
650  #define CYTHON_CCOMPLEX 1
651  #else
652  #define CYTHON_CCOMPLEX 0
653  #endif
654 #endif
655 #if CYTHON_CCOMPLEX
656  #ifdef __cplusplus
657  #include <complex>
658  #else
659  #include <complex.h>
660  #endif
661 #endif
662 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
663  #undef _Complex_I
664  #define _Complex_I 1.0fj
665 #endif
666 
667 
668 static const char *__pyx_f[] = {
669  "proteus/ADR.pyx",
670  "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd",
671  "linux2/lib/python2.7/site-packages/Cython/Includes/cpython/type.pxd",
672 };
673 
674 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
675  * # in Cython to enable them only on the right systems.
676  *
677  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
678  * ctypedef npy_int16 int16_t
679  * ctypedef npy_int32 int32_t
680  */
681 typedef npy_int8 __pyx_t_5numpy_int8_t;
682 
683 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
684  *
685  * ctypedef npy_int8 int8_t
686  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
687  * ctypedef npy_int32 int32_t
688  * ctypedef npy_int64 int64_t
689  */
690 typedef npy_int16 __pyx_t_5numpy_int16_t;
691 
692 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727
693  * ctypedef npy_int8 int8_t
694  * ctypedef npy_int16 int16_t
695  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
696  * ctypedef npy_int64 int64_t
697  * #ctypedef npy_int96 int96_t
698  */
699 typedef npy_int32 __pyx_t_5numpy_int32_t;
700 
701 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728
702  * ctypedef npy_int16 int16_t
703  * ctypedef npy_int32 int32_t
704  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
705  * #ctypedef npy_int96 int96_t
706  * #ctypedef npy_int128 int128_t
707  */
708 typedef npy_int64 __pyx_t_5numpy_int64_t;
709 
710 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
711  * #ctypedef npy_int128 int128_t
712  *
713  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
714  * ctypedef npy_uint16 uint16_t
715  * ctypedef npy_uint32 uint32_t
716  */
717 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
718 
719 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
720  *
721  * ctypedef npy_uint8 uint8_t
722  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
723  * ctypedef npy_uint32 uint32_t
724  * ctypedef npy_uint64 uint64_t
725  */
726 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
727 
728 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734
729  * ctypedef npy_uint8 uint8_t
730  * ctypedef npy_uint16 uint16_t
731  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
732  * ctypedef npy_uint64 uint64_t
733  * #ctypedef npy_uint96 uint96_t
734  */
735 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
736 
737 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735
738  * ctypedef npy_uint16 uint16_t
739  * ctypedef npy_uint32 uint32_t
740  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
741  * #ctypedef npy_uint96 uint96_t
742  * #ctypedef npy_uint128 uint128_t
743  */
744 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
745 
746 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
747  * #ctypedef npy_uint128 uint128_t
748  *
749  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
750  * ctypedef npy_float64 float64_t
751  * #ctypedef npy_float80 float80_t
752  */
753 typedef npy_float32 __pyx_t_5numpy_float32_t;
754 
755 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
756  *
757  * ctypedef npy_float32 float32_t
758  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
759  * #ctypedef npy_float80 float80_t
760  * #ctypedef npy_float128 float128_t
761  */
762 typedef npy_float64 __pyx_t_5numpy_float64_t;
763 
764 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
765  * # The int types are mapped a bit surprising --
766  * # numpy.int corresponds to 'l' and numpy.long to 'q'
767  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
768  * ctypedef npy_longlong long_t
769  * ctypedef npy_longlong longlong_t
770  */
771 typedef npy_long __pyx_t_5numpy_int_t;
772 
773 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750
774  * # numpy.int corresponds to 'l' and numpy.long to 'q'
775  * ctypedef npy_long int_t
776  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
777  * ctypedef npy_longlong longlong_t
778  *
779  */
780 typedef npy_longlong __pyx_t_5numpy_long_t;
781 
782 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
783  * ctypedef npy_long int_t
784  * ctypedef npy_longlong long_t
785  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
786  *
787  * ctypedef npy_ulong uint_t
788  */
789 typedef npy_longlong __pyx_t_5numpy_longlong_t;
790 
791 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
792  * ctypedef npy_longlong longlong_t
793  *
794  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
795  * ctypedef npy_ulonglong ulong_t
796  * ctypedef npy_ulonglong ulonglong_t
797  */
798 typedef npy_ulong __pyx_t_5numpy_uint_t;
799 
800 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
801  *
802  * ctypedef npy_ulong uint_t
803  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
804  * ctypedef npy_ulonglong ulonglong_t
805  *
806  */
807 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
808 
809 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
810  * ctypedef npy_ulong uint_t
811  * ctypedef npy_ulonglong ulong_t
812  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
813  *
814  * ctypedef npy_intp intp_t
815  */
816 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
817 
818 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757
819  * ctypedef npy_ulonglong ulonglong_t
820  *
821  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
822  * ctypedef npy_uintp uintp_t
823  *
824  */
825 typedef npy_intp __pyx_t_5numpy_intp_t;
826 
827 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
828  *
829  * ctypedef npy_intp intp_t
830  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
831  *
832  * ctypedef npy_double float_t
833  */
834 typedef npy_uintp __pyx_t_5numpy_uintp_t;
835 
836 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
837  * ctypedef npy_uintp uintp_t
838  *
839  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
840  * ctypedef npy_double double_t
841  * ctypedef npy_longdouble longdouble_t
842  */
843 typedef npy_double __pyx_t_5numpy_float_t;
844 
845 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761
846  *
847  * ctypedef npy_double float_t
848  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
849  * ctypedef npy_longdouble longdouble_t
850  *
851  */
852 typedef npy_double __pyx_t_5numpy_double_t;
853 
854 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
855  * ctypedef npy_double float_t
856  * ctypedef npy_double double_t
857  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
858  *
859  * ctypedef npy_cfloat cfloat_t
860  */
861 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
862 /* Declarations.proto */
863 #if CYTHON_CCOMPLEX
864  #ifdef __cplusplus
865  typedef ::std::complex< float > __pyx_t_float_complex;
866  #else
867  typedef float _Complex __pyx_t_float_complex;
868  #endif
869 #else
870  typedef struct { float real, imag; } __pyx_t_float_complex;
871 #endif
872 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
873 
874 /* Declarations.proto */
875 #if CYTHON_CCOMPLEX
876  #ifdef __cplusplus
877  typedef ::std::complex< double > __pyx_t_double_complex;
878  #else
879  typedef double _Complex __pyx_t_double_complex;
880  #endif
881 #else
882  typedef struct { double real, imag; } __pyx_t_double_complex;
883 #endif
884 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
885 
886 
887 /*--- Type declarations ---*/
888 struct __pyx_obj_3ADR_ADR;
889 
890 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
891  * ctypedef npy_longdouble longdouble_t
892  *
893  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
894  * ctypedef npy_cdouble cdouble_t
895  * ctypedef npy_clongdouble clongdouble_t
896  */
897 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
898 
899 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
900  *
901  * ctypedef npy_cfloat cfloat_t
902  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
903  * ctypedef npy_clongdouble clongdouble_t
904  *
905  */
906 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
907 
908 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
909  * ctypedef npy_cfloat cfloat_t
910  * ctypedef npy_cdouble cdouble_t
911  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
912  *
913  * ctypedef npy_cdouble complex_t
914  */
915 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
916 
917 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
918  * ctypedef npy_clongdouble clongdouble_t
919  *
920  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
921  *
922  * cdef inline object PyArray_MultiIterNew1(a):
923  */
924 typedef npy_cdouble __pyx_t_5numpy_complex_t;
925 
926 /* "ADR.pyx":140
927  *
928  *
929  * cdef class ADR: # <<<<<<<<<<<<<<
930  * """
931  * Optimized ADR member functions
932  */
933 struct __pyx_obj_3ADR_ADR {
934  PyObject_HEAD
935  proteus::cppADR_base *thisptr;
936 };
937 
938 
939 /* --- Runtime support code (head) --- */
940 /* Refnanny.proto */
941 #ifndef CYTHON_REFNANNY
942  #define CYTHON_REFNANNY 0
943 #endif
944 #if CYTHON_REFNANNY
945  typedef struct {
946  void (*INCREF)(void*, PyObject*, int);
947  void (*DECREF)(void*, PyObject*, int);
948  void (*GOTREF)(void*, PyObject*, int);
949  void (*GIVEREF)(void*, PyObject*, int);
950  void* (*SetupContext)(const char*, int, const char*);
951  void (*FinishContext)(void**);
952  } __Pyx_RefNannyAPIStruct;
953  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
954  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
955  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
956 #ifdef WITH_THREAD
957  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
958  if (acquire_gil) {\
959  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
960  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
961  PyGILState_Release(__pyx_gilstate_save);\
962  } else {\
963  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
964  }
965 #else
966  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
967  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
968 #endif
969  #define __Pyx_RefNannyFinishContext()\
970  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
971  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
972  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
973  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
974  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
975  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
976  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
977  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
978  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
979 #else
980  #define __Pyx_RefNannyDeclarations
981  #define __Pyx_RefNannySetupContext(name, acquire_gil)
982  #define __Pyx_RefNannyFinishContext()
983  #define __Pyx_INCREF(r) Py_INCREF(r)
984  #define __Pyx_DECREF(r) Py_DECREF(r)
985  #define __Pyx_GOTREF(r)
986  #define __Pyx_GIVEREF(r)
987  #define __Pyx_XINCREF(r) Py_XINCREF(r)
988  #define __Pyx_XDECREF(r) Py_XDECREF(r)
989  #define __Pyx_XGOTREF(r)
990  #define __Pyx_XGIVEREF(r)
991 #endif
992 #define __Pyx_XDECREF_SET(r, v) do {\
993  PyObject *tmp = (PyObject *) r;\
994  r = v; __Pyx_XDECREF(tmp);\
995  } while (0)
996 #define __Pyx_DECREF_SET(r, v) do {\
997  PyObject *tmp = (PyObject *) r;\
998  r = v; __Pyx_DECREF(tmp);\
999  } while (0)
1000 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1001 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1002 
1003 /* PyObjectGetAttrStr.proto */
1004 #if CYTHON_USE_TYPE_SLOTS
1005 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1006  PyTypeObject* tp = Py_TYPE(obj);
1007  if (likely(tp->tp_getattro))
1008  return tp->tp_getattro(obj, attr_name);
1009 #if PY_MAJOR_VERSION < 3
1010  if (likely(tp->tp_getattr))
1011  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1012 #endif
1013  return PyObject_GetAttr(obj, attr_name);
1014 }
1015 #else
1016 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1017 #endif
1018 
1019 /* GetBuiltinName.proto */
1020 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1021 
1022 /* RaiseArgTupleInvalid.proto */
1023 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1024  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1025 
1026 /* RaiseDoubleKeywords.proto */
1027 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1028 
1029 /* ParseKeywords.proto */
1030 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1031  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1032  const char* function_name);
1033 
1034 /* ArgTypeTest.proto */
1035 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
1036  const char *name, int exact);
1037 
1038 /* PyCFunctionFastCall.proto */
1039 #if CYTHON_FAST_PYCCALL
1040 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1041 #else
1042 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1043 #endif
1044 
1045 /* PyFunctionFastCall.proto */
1046 #if CYTHON_FAST_PYCALL
1047 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1048  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1049 #if 1 || PY_VERSION_HEX < 0x030600B1
1050 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1051 #else
1052 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1053 #endif
1054 #endif
1055 
1056 /* PyObjectCall.proto */
1057 #if CYTHON_COMPILING_IN_CPYTHON
1058 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1059 #else
1060 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1061 #endif
1062 
1063 /* PyObjectCallMethO.proto */
1064 #if CYTHON_COMPILING_IN_CPYTHON
1065 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1066 #endif
1067 
1068 /* PyObjectCallOneArg.proto */
1069 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1070 
1071 /* PyObjectCallNoArg.proto */
1072 #if CYTHON_COMPILING_IN_CPYTHON
1073 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1074 #else
1075 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1076 #endif
1077 
1078 /* RaiseTooManyValuesToUnpack.proto */
1079 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1080 
1081 /* RaiseNeedMoreValuesToUnpack.proto */
1082 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1083 
1084 /* IterFinish.proto */
1085 static CYTHON_INLINE int __Pyx_IterFinish(void);
1086 
1087 /* UnpackItemEndCheck.proto */
1088 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1089 
1090 /* ExtTypeTest.proto */
1091 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1092 
1093 /* GetModuleGlobalName.proto */
1094 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1095 
1096 /* PyObjectSetAttrStr.proto */
1097 #if CYTHON_USE_TYPE_SLOTS
1098 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
1099 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
1100  PyTypeObject* tp = Py_TYPE(obj);
1101  if (likely(tp->tp_setattro))
1102  return tp->tp_setattro(obj, attr_name, value);
1103 #if PY_MAJOR_VERSION < 3
1104  if (likely(tp->tp_setattr))
1105  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
1106 #endif
1107  return PyObject_SetAttr(obj, attr_name, value);
1108 }
1109 #else
1110 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
1111 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1112 #endif
1113 
1114 /* ListAppend.proto */
1115 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1116 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1117  PyListObject* L = (PyListObject*) list;
1118  Py_ssize_t len = Py_SIZE(list);
1119  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1120  Py_INCREF(x);
1121  PyList_SET_ITEM(list, len, x);
1122  Py_SIZE(list) = len+1;
1123  return 0;
1124  }
1125  return PyList_Append(list, x);
1126 }
1127 #else
1128 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1129 #endif
1130 
1131 /* PyObjectCallMethod1.proto */
1132 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1133 
1134 /* append.proto */
1135 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
1136 
1137 /* PyIntBinop.proto */
1138 #if !CYTHON_COMPILING_IN_PYPY
1139 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1140 #else
1141 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1142  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1143 #endif
1144 
1145 /* SliceObject.proto */
1146 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1147  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1148 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1149  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1150  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1151  int has_cstart, int has_cstop, int wraparound);
1152 
1153 /* GetItemInt.proto */
1154 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1155  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1156  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1157  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1158  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1159 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1160  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1161  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1162  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1163 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1164  int wraparound, int boundscheck);
1165 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1166  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1167  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1168  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1169 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1170  int wraparound, int boundscheck);
1171 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1172 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1173  int is_list, int wraparound, int boundscheck);
1174 
1175 /* ListCompAppend.proto */
1176 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1177 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1178  PyListObject* L = (PyListObject*) list;
1179  Py_ssize_t len = Py_SIZE(list);
1180  if (likely(L->allocated > len)) {
1181  Py_INCREF(x);
1182  PyList_SET_ITEM(list, len, x);
1183  Py_SIZE(list) = len+1;
1184  return 0;
1185  }
1186  return PyList_Append(list, x);
1187 }
1188 #else
1189 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1190 #endif
1191 
1192 /* SliceObject.proto */
1193 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1194  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1195  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1196  int has_cstart, int has_cstop, int wraparound);
1197 
1198 /* Import.proto */
1199 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1200 
1201 /* ImportFrom.proto */
1202 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1203 
1204 /* IncludeStringH.proto */
1205 #include <string.h>
1206 
1207 /* BytesEquals.proto */
1208 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1209 
1210 /* UnicodeEquals.proto */
1211 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1212 
1213 /* StrEquals.proto */
1214 #if PY_MAJOR_VERSION >= 3
1215 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1216 #else
1217 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1218 #endif
1219 
1220 /* PyIntBinop.proto */
1221 #if !CYTHON_COMPILING_IN_PYPY
1222 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1223 #else
1224 #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
1225  PyObject_RichCompare(op1, op2, Py_EQ)
1226  #endif
1227 
1228 /* PyObjectCallMethod0.proto */
1229 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
1230 
1231 /* RaiseNoneIterError.proto */
1232 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1233 
1234 /* UnpackTupleError.proto */
1235 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
1236 
1237 /* UnpackTuple2.proto */
1238 static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
1239  int is_tuple, int has_known_size, int decref_tuple);
1240 
1241 /* dict_iter.proto */
1242 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
1243  Py_ssize_t* p_orig_length, int* p_is_dict);
1244 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
1245  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
1246 
1247 /* PyThreadStateGet.proto */
1248 #if CYTHON_FAST_THREAD_STATE
1249 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1250 #define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
1251 #else
1252 #define __Pyx_PyThreadState_declare
1253 #define __Pyx_PyThreadState_assign
1254 #endif
1255 
1256 /* PyErrFetchRestore.proto */
1257 #if CYTHON_FAST_THREAD_STATE
1258 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1259 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1260 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1261 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1262 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1263 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1264 #else
1265 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1266 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1267 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1268 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1269 #endif
1270 
1271 /* RaiseException.proto */
1272 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1273 
1274 /* DictGetItem.proto */
1275 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1276 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
1277  PyObject *value;
1278  value = PyDict_GetItemWithError(d, key);
1279  if (unlikely(!value)) {
1280  if (!PyErr_Occurred()) {
1281  PyObject* args = PyTuple_Pack(1, key);
1282  if (likely(args))
1283  PyErr_SetObject(PyExc_KeyError, args);
1284  Py_XDECREF(args);
1285  }
1286  return NULL;
1287  }
1288  Py_INCREF(value);
1289  return value;
1290 }
1291 #else
1292  #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1293 #endif
1294 
1295 /* SaveResetException.proto */
1296 #if CYTHON_FAST_THREAD_STATE
1297 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1298 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1299 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1300 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1301 #else
1302 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1303 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1304 #endif
1305 
1306 /* PyErrExceptionMatches.proto */
1307 #if CYTHON_FAST_THREAD_STATE
1308 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1309 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1310 #else
1311 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1312 #endif
1313 
1314 /* GetException.proto */
1315 #if CYTHON_FAST_THREAD_STATE
1316 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1317 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1318 #else
1319 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1320 #endif
1321 
1322 /* CalculateMetaclass.proto */
1323 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1324 
1325 /* FetchCommonType.proto */
1326 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1327 
1328 /* CythonFunction.proto */
1329 #define __Pyx_CyFunction_USED 1
1330 #include <structmember.h>
1331 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
1332 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
1333 #define __Pyx_CYFUNCTION_CCLASS 0x04
1334 #define __Pyx_CyFunction_GetClosure(f)\
1335  (((__pyx_CyFunctionObject *) (f))->func_closure)
1336 #define __Pyx_CyFunction_GetClassObj(f)\
1337  (((__pyx_CyFunctionObject *) (f))->func_classobj)
1338 #define __Pyx_CyFunction_Defaults(type, f)\
1339  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1340 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1341  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1342 typedef struct {
1343  PyCFunctionObject func;
1344 #if PY_VERSION_HEX < 0x030500A0
1345  PyObject *func_weakreflist;
1346 #endif
1347  PyObject *func_dict;
1348  PyObject *func_name;
1349  PyObject *func_qualname;
1350  PyObject *func_doc;
1351  PyObject *func_globals;
1352  PyObject *func_code;
1353  PyObject *func_closure;
1354  PyObject *func_classobj;
1355  void *defaults;
1356  int defaults_pyobjects;
1357  int flags;
1358  PyObject *defaults_tuple;
1359  PyObject *defaults_kwdict;
1360  PyObject *(*defaults_getter)(PyObject *);
1361  PyObject *func_annotations;
1362 } __pyx_CyFunctionObject;
1363 static PyTypeObject *__pyx_CyFunctionType = 0;
1364 #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
1365  __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
1366 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
1367  int flags, PyObject* qualname,
1368  PyObject *self,
1369  PyObject *module, PyObject *globals,
1370  PyObject* code);
1371 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1372  size_t size,
1373  int pyobjects);
1374 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1375  PyObject *tuple);
1376 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1377  PyObject *dict);
1378 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1379  PyObject *dict);
1380 static int __pyx_CyFunction_init(void);
1381 
1382 /* Py3ClassCreate.proto */
1383 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1384  PyObject *mkw, PyObject *modname, PyObject *doc);
1385 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1386  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1387 
1388 /* CodeObjectCache.proto */
1389 typedef struct {
1390  PyCodeObject* code_object;
1391  int code_line;
1392 } __Pyx_CodeObjectCacheEntry;
1393 struct __Pyx_CodeObjectCache {
1394  int count;
1395  int max_count;
1396  __Pyx_CodeObjectCacheEntry* entries;
1397 };
1398 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1399 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1400 static PyCodeObject *__pyx_find_code_object(int code_line);
1401 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1402 
1403 /* AddTraceback.proto */
1404 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1405  int py_line, const char *filename);
1406 
1407 /* CIntToPy.proto */
1408 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1409 
1410 /* RealImag.proto */
1411 #if CYTHON_CCOMPLEX
1412  #ifdef __cplusplus
1413  #define __Pyx_CREAL(z) ((z).real())
1414  #define __Pyx_CIMAG(z) ((z).imag())
1415  #else
1416  #define __Pyx_CREAL(z) (__real__(z))
1417  #define __Pyx_CIMAG(z) (__imag__(z))
1418  #endif
1419 #else
1420  #define __Pyx_CREAL(z) ((z).real)
1421  #define __Pyx_CIMAG(z) ((z).imag)
1422 #endif
1423 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1424  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1425  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1426  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1427 #else
1428  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1429  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1430 #endif
1431 
1432 /* Arithmetic.proto */
1433 #if CYTHON_CCOMPLEX
1434  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1435  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1436  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1437  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1438  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1439  #define __Pyx_c_neg_float(a) (-(a))
1440  #ifdef __cplusplus
1441  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1442  #define __Pyx_c_conj_float(z) (::std::conj(z))
1443  #if 1
1444  #define __Pyx_c_abs_float(z) (::std::abs(z))
1445  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1446  #endif
1447  #else
1448  #define __Pyx_c_is_zero_float(z) ((z)==0)
1449  #define __Pyx_c_conj_float(z) (conjf(z))
1450  #if 1
1451  #define __Pyx_c_abs_float(z) (cabsf(z))
1452  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1453  #endif
1454  #endif
1455 #else
1456  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1457  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1458  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1459  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1460  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1461  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1462  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1463  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1464  #if 1
1465  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1466  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1467  #endif
1468 #endif
1469 
1470 /* Arithmetic.proto */
1471 #if CYTHON_CCOMPLEX
1472  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1473  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1474  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1475  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1476  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1477  #define __Pyx_c_neg_double(a) (-(a))
1478  #ifdef __cplusplus
1479  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1480  #define __Pyx_c_conj_double(z) (::std::conj(z))
1481  #if 1
1482  #define __Pyx_c_abs_double(z) (::std::abs(z))
1483  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1484  #endif
1485  #else
1486  #define __Pyx_c_is_zero_double(z) ((z)==0)
1487  #define __Pyx_c_conj_double(z) (conj(z))
1488  #if 1
1489  #define __Pyx_c_abs_double(z) (cabs(z))
1490  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1491  #endif
1492  #endif
1493 #else
1494  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1495  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1496  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1497  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1498  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1499  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1500  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1501  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1502  #if 1
1503  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1504  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1505  #endif
1506 #endif
1507 
1508 /* CIntToPy.proto */
1509 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1510 
1511 /* CIntToPy.proto */
1512 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1513 
1514 /* CIntFromPy.proto */
1515 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1516 
1517 /* CIntFromPy.proto */
1518 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1519 
1520 /* CheckBinaryVersion.proto */
1521 static int __Pyx_check_binary_version(void);
1522 
1523 /* PyIdentifierFromString.proto */
1524 #if !defined(__Pyx_PyIdentifier_FromString)
1525 #if PY_MAJOR_VERSION < 3
1526  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
1527 #else
1528  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
1529 #endif
1530 #endif
1531 
1532 /* ModuleImport.proto */
1533 static PyObject *__Pyx_ImportModule(const char *name);
1534 
1535 /* TypeImport.proto */
1536 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
1537 
1538 /* InitStrings.proto */
1539 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1540 
1541 
1542 /* Module declarations from 'cpython.buffer' */
1543 
1544 /* Module declarations from 'libc.string' */
1545 
1546 /* Module declarations from 'libc.stdio' */
1547 
1548 /* Module declarations from '__builtin__' */
1549 
1550 /* Module declarations from 'cpython.type' */
1551 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1552 
1553 /* Module declarations from 'cpython' */
1554 
1555 /* Module declarations from 'cpython.object' */
1556 
1557 /* Module declarations from 'cpython.ref' */
1558 
1559 /* Module declarations from 'libc.stdlib' */
1560 
1561 /* Module declarations from 'numpy' */
1562 
1563 /* Module declarations from 'numpy' */
1564 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1565 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1566 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1567 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1568 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1569 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1570 
1571 /* Module declarations from 'ADR' */
1572 static PyTypeObject *__pyx_ptype_3ADR_ADR = 0;
1573 #define __Pyx_MODULE_NAME "ADR"
1574 int __pyx_module_is_main_ADR = 0;
1575 
1576 /* Implementation of 'ADR' */
1577 static PyObject *__pyx_builtin_range;
1578 static PyObject *__pyx_builtin_sum;
1579 static PyObject *__pyx_builtin_enumerate;
1580 static PyObject *__pyx_builtin_ValueError;
1581 static PyObject *__pyx_builtin_RuntimeError;
1582 static PyObject *__pyx_builtin_ImportError;
1583 static const char __pyx_k_I[] = "I";
1584 static const char __pyx_k_a[] = "a";
1585 static const char __pyx_k_c[] = "c";
1586 static const char __pyx_k_d[] = "d";
1587 static const char __pyx_k_g[] = "g";
1588 static const char __pyx_k_i[] = "i";
1589 static const char __pyx_k_k[] = "k";
1590 static const char __pyx_k_m[] = "m";
1591 static const char __pyx_k_n[] = "n";
1592 static const char __pyx_k_q[] = "q";
1593 static const char __pyx_k_r[] = "r";
1594 static const char __pyx_k_t[] = "t";
1595 static const char __pyx_k_u[] = "u";
1596 static const char __pyx_k_x[] = "x";
1597 static const char __pyx_k_ci[] = "ci";
1598 static const char __pyx_k_cj[] = "cj";
1599 static const char __pyx_k_ck[] = "ck";
1600 static const char __pyx_k_cq[] = "cq";
1601 static const char __pyx_k_dc[] = "dc";
1602 static const char __pyx_k_df[] = "df";
1603 static const char __pyx_k_nI[] = "nI";
1604 static const char __pyx_k_nc[] = "nc";
1605 static const char __pyx_k_nd[] = "nd";
1606 static const char __pyx_k_sd[] = "sd";
1607 static const char __pyx_k_ua[] = "ua";
1608 static const char __pyx_k_vt[] = "vt";
1609 static const char __pyx_k_ADR[] = "ADR";
1610 static const char __pyx_k_adr[] = "adr";
1611 static const char __pyx_k_cfl[] = "cfl";
1612 static const char __pyx_k_dim[] = "dim";
1613 static const char __pyx_k_doc[] = "__doc__";
1614 static const char __pyx_k_dof[] = "dof";
1615 static const char __pyx_k_ebN[] = "ebN";
1616 static const char __pyx_k_ebq[] = "ebq";
1617 static const char __pyx_k_get[] = "get";
1618 static const char __pyx_k_l2g[] = "l2g";
1619 static const char __pyx_k_lag[] = "lag";
1620 static const char __pyx_k_log[] = "log";
1621 static const char __pyx_k_max[] = "max";
1622 static const char __pyx_k_pdb[] = "pdb";
1623 static const char __pyx_k_phi[] = "phi";
1624 static const char __pyx_k_psi[] = "psi";
1625 static const char __pyx_k_q_a[] = "q_a";
1626 static const char __pyx_k_q_r[] = "q_r";
1627 static const char __pyx_k_q_v[] = "q_v";
1628 static const char __pyx_k_row[] = "row";
1629 static const char __pyx_k_sum[] = "sum";
1630 static const char __pyx_k_u_j[] = "u_j";
1631 static const char __pyx_k_Comm[] = "Comm";
1632 static const char __pyx_k_Hess[] = "Hess";
1633 static const char __pyx_k_aOfX[] = "aOfX";
1634 static const char __pyx_k_cebq[] = "cebq";
1635 static const char __pyx_k_comm[] = "comm";
1636 static const char __pyx_k_copy[] = "copy";
1637 static const char __pyx_k_data[] = "data";
1638 static const char __pyx_k_dphi[] = "dphi";
1639 static const char __pyx_k_ebNE[] = "ebNE";
1640 static const char __pyx_k_ebqe[] = "ebqe";
1641 static const char __pyx_k_fOfX[] = "fOfX";
1642 static const char __pyx_k_fabs[] = "fabs";
1643 static const char __pyx_k_fill[] = "fill";
1644 static const char __pyx_k_flag[] = "flag";
1645 static const char __pyx_k_flat[] = "flat";
1646 static const char __pyx_k_init[] = "__init__";
1647 static const char __pyx_k_keys[] = "keys";
1648 static const char __pyx_k_main[] = "__main__";
1649 static const char __pyx_k_mass[] = "mass";
1650 static const char __pyx_k_math[] = "math";
1651 static const char __pyx_k_mesh[] = "mesh";
1652 static const char __pyx_k_name[] = "name";
1653 static const char __pyx_k_self[] = "self";
1654 static const char __pyx_k_size[] = "size";
1655 static const char __pyx_k_stab[] = "stab";
1656 static const char __pyx_k_step[] = "step";
1657 static const char __pyx_k_stop[] = "stop";
1658 static const char __pyx_k_test[] = "__test__";
1659 static const char __pyx_k_array[] = "array";
1660 static const char __pyx_k_cebqe[] = "cebqe";
1661 static const char __pyx_k_class[] = "__class__";
1662 static const char __pyx_k_dtype[] = "dtype";
1663 static const char __pyx_k_level[] = "level";
1664 static const char __pyx_k_numpy[] = "numpy";
1665 static const char __pyx_k_phi_k[] = "phi_k";
1666 static const char __pyx_k_range[] = "range";
1667 static const char __pyx_k_shape[] = "shape";
1668 static const char __pyx_k_start[] = "start";
1669 static const char __pyx_k_uDict[] = "uDict";
1670 static const char __pyx_k_u_dof[] = "u_dof";
1671 static const char __pyx_k_u_l2g[] = "u_l2g";
1672 static const char __pyx_k_zeros[] = "zeros";
1673 static const char __pyx_k_CT_sge[] = "CT_sge";
1674 static const char __pyx_k_append[] = "append";
1675 static const char __pyx_k_arange[] = "arange";
1676 static const char __pyx_k_dS_ref[] = "dS_ref";
1677 static const char __pyx_k_dV_ref[] = "dV_ref";
1678 static const char __pyx_k_dofMap[] = "dofMap";
1679 static const char __pyx_k_ebqe_a[] = "ebqe_a";
1680 static const char __pyx_k_ebqe_v[] = "ebqe_v";
1681 static const char __pyx_k_grad_u[] = "grad(u)";
1682 static const char __pyx_k_import[] = "__import__";
1683 static const char __pyx_k_l2proj[] = "l2proj";
1684 static const char __pyx_k_linear[] = "linear";
1685 static const char __pyx_k_lowmem[] = "lowmem";
1686 static const char __pyx_k_memory[] = "memory";
1687 static const char __pyx_k_module[] = "__module__";
1688 static const char __pyx_k_nCalls[] = "nCalls";
1689 static const char __pyx_k_nSteps[] = "nSteps";
1690 static const char __pyx_k_name_2[] = "__name__";
1691 static const char __pyx_k_offset[] = "offset";
1692 static const char __pyx_k_phi_ip[] = "phi_ip";
1693 static const char __pyx_k_sdInfo[] = "sdInfo";
1694 static const char __pyx_k_stride[] = "stride";
1695 static const char __pyx_k_values[] = "values";
1696 static const char __pyx_k_TC_base[] = "TC_base";
1697 static const char __pyx_k_default[] = "default";
1698 static const char __pyx_k_has_key[] = "has_key";
1699 static const char __pyx_k_matType[] = "matType";
1700 static const char __pyx_k_numDiff[] = "numDiff";
1701 static const char __pyx_k_options[] = "options";
1702 static const char __pyx_k_outFlow[] = "outFlow";
1703 static const char __pyx_k_penalty[] = "penalty";
1704 static const char __pyx_k_phiDict[] = "phiDict";
1705 static const char __pyx_k_prepare[] = "__prepare__";
1706 static const char __pyx_k_proteus[] = "proteus";
1707 static const char __pyx_k_sc_beta[] = "sc_beta";
1708 static const char __pyx_k_sc_uref[] = "sc_uref";
1709 static const char __pyx_k_setFlow[] = "setFlow";
1710 static const char __pyx_k_Archiver[] = "Archiver";
1711 static const char __pyx_k_Jacobian[] = "Jacobian ";
1712 static const char __pyx_k_SGE_base[] = "SGE_base";
1713 static const char __pyx_k_constant[] = "constant";
1714 static const char __pyx_k_evaluate[] = "evaluate";
1715 static const char __pyx_k_femSpace[] = "femSpace";
1716 static const char __pyx_k_grad_psi[] = "grad_psi";
1717 static const char __pyx_k_jacobian[] = "jacobian";
1718 static const char __pyx_k_logEvent[] = "logEvent";
1719 static const char __pyx_k_mesh_dof[] = "mesh_dof";
1720 static const char __pyx_k_mesh_l2g[] = "mesh_l2g";
1721 static const char __pyx_k_nSpaceIn[] = "nSpaceIn";
1722 static const char __pyx_k_offset_u[] = "offset_u";
1723 static const char __pyx_k_qualname[] = "__qualname__";
1724 static const char __pyx_k_reaction[] = "reaction";
1725 static const char __pyx_k_sc_alpha[] = "sc_alpha";
1726 static const char __pyx_k_stride_u[] = "stride_u";
1727 static const char __pyx_k_timeTerm[] = "timeTerm";
1728 static const char __pyx_k_velocity[] = "velocity";
1729 static const char __pyx_k_Transport[] = "Transport";
1730 static const char __pyx_k_advection[] = "advection";
1731 static const char __pyx_k_diffusion[] = "diffusion";
1732 static const char __pyx_k_eN_global[] = "eN_global";
1733 static const char __pyx_k_enumerate[] = "enumerate";
1734 static const char __pyx_k_fbcObject[] = "fbcObject";
1735 static const char __pyx_k_getValues[] = "getValues";
1736 static const char __pyx_k_globalMax[] = "globalMax";
1737 static const char __pyx_k_globalSum[] = "globalSum";
1738 static const char __pyx_k_iteritems[] = "iteritems";
1739 static const char __pyx_k_metaclass[] = "__metaclass__";
1740 static const char __pyx_k_mixedFlow[] = "mixedFlow";
1741 static const char __pyx_k_nodeArray[] = "nodeArray";
1742 static const char __pyx_k_nonlinear[] = "nonlinear";
1743 static const char __pyx_k_potential[] = "potential";
1744 static const char __pyx_k_psi_trace[] = "psi_trace";
1745 static const char __pyx_k_testSpace[] = "testSpace";
1746 static const char __pyx_k_LevelModel[] = "LevelModel";
1747 static const char __pyx_k_Quadrature[] = "Quadrature";
1748 static const char __pyx_k_ValueError[] = "ValueError";
1749 static const char __pyx_k_XdmfWriter[] = "XdmfWriter";
1750 static const char __pyx_k_buildUnion[] = "buildUnion";
1751 static const char __pyx_k_components[] = "components";
1752 static const char __pyx_k_ebq_global[] = "ebq_global";
1753 static const char __pyx_k_inflowFlux[] = "inflowFlux";
1754 static const char __pyx_k_normal_ref[] = "normal_ref";
1755 static const char __pyx_k_tLast_mesh[] = "tLast_mesh";
1756 static const char __pyx_k_u_test_ref[] = "u_test_ref";
1757 static const char __pyx_k_useMetrics[] = "useMetrics";
1758 static const char __pyx_k_ImportError[] = "ImportError";
1759 static const char __pyx_k_cebq_global[] = "cebq_global";
1760 static const char __pyx_k_defaultName[] = "defaultName";
1761 static const char __pyx_k_ebN_element[] = "ebN_element";
1762 static const char __pyx_k_elementMaps[] = "elementMaps";
1763 static const char __pyx_k_estimate_mt[] = "estimate_mt";
1764 static const char __pyx_k_getJacobian[] = "getJacobian";
1765 static const char __pyx_k_getResidual[] = "getResidual";
1766 static const char __pyx_k_hamiltonian[] = "hamiltonian";
1767 static const char __pyx_k_massLumping[] = "massLumping";
1768 static const char __pyx_k_q_numDiff_u[] = "q_numDiff_u";
1769 static const char __pyx_k_setUnknowns[] = "setUnknowns";
1770 static const char __pyx_k_testIsTrial[] = "testIsTrial";
1771 static const char __pyx_k_u_trial_ref[] = "u_trial_ref";
1772 static const char __pyx_k_Coefficients[] = "Coefficients";
1773 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1774 static const char __pyx_k_SubgridError[] = "SubgridError";
1775 static const char __pyx_k_coefficients[] = "coefficients";
1776 static const char __pyx_k_ebqe_penalty[] = "ebqe_penalty";
1777 static const char __pyx_k_movingDomain[] = "movingDomain";
1778 static const char __pyx_k_numDiff_last[] = "numDiff_last";
1779 static const char __pyx_k_MOVING_DOMAIN[] = "MOVING_DOMAIN";
1780 static const char __pyx_k_NumericalFlux[] = "NumericalFlux";
1781 static const char __pyx_k_adjoint_sigma[] = "adjoint_sigma";
1782 static const char __pyx_k_cfemIntegrals[] = "cfemIntegrals";
1783 static const char __pyx_k_csrRowIndeces[] = "csrRowIndeces";
1784 static const char __pyx_k_diffusionDict[] = "diffusionDict";
1785 static const char __pyx_k_ebqe_bc_u_ext[] = "ebqe_bc_u_ext";
1786 static const char __pyx_k_internalNodes[] = "internalNodes";
1787 static const char __pyx_k_isDOFBoundary[] = "isDOFBoundary";
1788 static const char __pyx_k_nNodes_global[] = "nNodes_global";
1789 static const char __pyx_k_nSpace_global[] = "nSpace_global";
1790 static const char __pyx_k_nStepsToDelay[] = "nStepsToDelay";
1791 static const char __pyx_k_nVDOF_element[] = "nVDOF_element";
1792 static const char __pyx_k_numericalFlux[] = "numericalFlux";
1793 static const char __pyx_k_penalty_power[] = "penalty_power";
1794 static const char __pyx_k_stabilization[] = "stabilization";
1795 static const char __pyx_k_stride_offset[] = "stride+offset";
1796 static const char __pyx_k_testSpaceDict[] = "testSpaceDict";
1797 static const char __pyx_k_variableNames[] = "variableNames";
1798 static const char __pyx_k_CompKernelFlag[] = "CompKernelFlag";
1799 static const char __pyx_k_ShockCapturing[] = "ShockCapturing";
1800 static const char __pyx_k_compKernelFlag[] = "compKernelFlag";
1801 static const char __pyx_k_elemQuadIsDict[] = "elemQuadIsDict";
1802 static const char __pyx_k_globalJacobian[] = "globalJacobian";
1803 static const char __pyx_k_globalResidual[] = "globalResidual";
1804 static const char __pyx_k_grad_psi_trace[] = "grad_psi_trace";
1805 static const char __pyx_k_initializeMesh[] = "initializeMesh";
1806 static const char __pyx_k_mesh_trial_ref[] = "mesh_trial_ref";
1807 static const char __pyx_k_nNodes_element[] = "nNodes_element";
1808 static const char __pyx_k_setFromOptions[] = "setFromOptions";
1809 static const char __pyx_k_shockCapturing[] = "shockCapturing";
1810 static const char __pyx_k_Global_residual[] = "Global residual";
1811 static const char __pyx_k_TimeIntegration[] = "TimeIntegration";
1812 static const char __pyx_k_boundaryJac_ref[] = "boundaryJac_ref";
1813 static const char __pyx_k_boundaryNormals[] = "boundaryNormals";
1814 static const char __pyx_k_elementDiameter[] = "elementDiameter";
1815 static const char __pyx_k_isDOFBoundary_u[] = "isDOFBoundary_u";
1816 static const char __pyx_k_nElements_owned[] = "nElements_owned";
1817 static const char __pyx_k_nFreeDOF_global[] = "nFreeDOF_global";
1818 static const char __pyx_k_nNodes_internal[] = "nNodes_internal";
1819 static const char __pyx_k_phiTrialIsTrial[] = "phiTrialIsTrial";
1820 static const char __pyx_k_reactionLumping[] = "reactionLumping";
1821 static const char __pyx_k_timeIntegration[] = "timeIntegration";
1822 static const char __pyx_k_u_grad_test_ref[] = "u_grad_test_ref";
1823 static const char __pyx_k_advectiveFlux_bc[] = "advectiveFlux_bc";
1824 static const char __pyx_k_conservativeFlux[] = "conservativeFlux";
1825 static const char __pyx_k_csrColumnOffsets[] = "csrColumnOffsets";
1826 static const char __pyx_k_diffusiveFlux_bc[] = "diffusiveFlux_bc";
1827 static const char __pyx_k_inflowBoundaryBC[] = "inflowBoundaryBC";
1828 static const char __pyx_k_isFluxBoundary_u[] = "isFluxBoundary_u";
1829 static const char __pyx_k_max_nDOF_element[] = "max_nDOF_element";
1830 static const char __pyx_k_nElements_global[] = "nElements_global";
1831 static const char __pyx_k_nFreeVDOF_global[] = "nFreeVDOF_global";
1832 static const char __pyx_k_n_phi_ip_element[] = "n_phi_ip_element";
1833 static const char __pyx_k_penalty_constant[] = "penalty_constant";
1834 static const char __pyx_k_proteus_FemTools[] = "proteus.FemTools";
1835 static const char __pyx_k_q_numDiff_u_last[] = "q_numDiff_u_last";
1836 static const char __pyx_k_u_grad_trial_ref[] = "u_grad_trial_ref";
1837 static const char __pyx_k_u_test_trace_ref[] = "u_test_trace_ref";
1838 static const char __pyx_k_zeroJacobian_CSR[] = "zeroJacobian_CSR";
1839 static const char __pyx_k_L2projectEvaluate[] = "L2projectEvaluate";
1840 static const char __pyx_k_LevelModel___init[] = "LevelModel.__init__";
1841 static const char __pyx_k_NonlinearEquation[] = "NonlinearEquation";
1842 static const char __pyx_k_OneLevelTransport[] = "OneLevelTransport";
1843 static const char __pyx_k_VOF_max_numDiff_e[] = "VOF: max numDiff %e";
1844 static const char __pyx_k_boundaryJacobians[] = "boundaryJacobians";
1845 static const char __pyx_k_calculateJacobian[] = "calculateJacobian";
1846 static const char __pyx_k_calculateResidual[] = "calculateResidual";
1847 static const char __pyx_k_csrRowIndeces_u_u[] = "csrRowIndeces_u_u";
1848 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
1849 static const char __pyx_k_elementQuadrature[] = "elementQuadrature";
1850 static const char __pyx_k_getBasisValuesRef[] = "getBasisValuesRef";
1851 static const char __pyx_k_nDOF_test_element[] = "nDOF_test_element";
1852 static const char __pyx_k_nQuadraturePoints[] = "nQuadraturePoints";
1853 static const char __pyx_k_nodeVelocityArray[] = "nodeVelocityArray";
1854 static const char __pyx_k_numericalFluxType[] = "numericalFluxType";
1855 static const char __pyx_k_proteus_Profiling[] = "proteus.Profiling";
1856 static const char __pyx_k_proteus_Transport[] = "proteus.Transport";
1857 static const char __pyx_k_sdInfo_u_u_colind[] = "sdInfo_u_u_colind";
1858 static const char __pyx_k_sdInfo_u_u_rowptr[] = "sdInfo_u_u_rowptr";
1859 static const char __pyx_k_setupFieldStrides[] = "setupFieldStrides";
1860 static const char __pyx_k_u_trial_trace_ref[] = "u_trial_trace_ref";
1861 static const char __pyx_k_NumericalFlux_IIPG[] = "NumericalFlux_IIPG";
1862 static const char __pyx_k_NumericalFlux_NIPG[] = "NumericalFlux_NIPG";
1863 static const char __pyx_k_NumericalFlux_SIPG[] = "NumericalFlux_SIPG";
1864 static const char __pyx_k_ebqe_bc_flux_u_ext[] = "ebqe_bc_flux_u_ext";
1865 static const char __pyx_k_internalNodesArray[] = "internalNodesArray";
1866 static const char __pyx_k_lag_shockCapturing[] = "lag_shockCapturing";
1867 static const char __pyx_k_localFunctionSpace[] = "localFunctionSpace";
1868 static const char __pyx_k_nDOF_trial_element[] = "nDOF_trial_element";
1869 static const char __pyx_k_setDirichletValues[] = "setDirichletValues";
1870 static const char __pyx_k_updateLocal2Global[] = "updateLocal2Global";
1871 static const char __pyx_k_useSparseDiffusion[] = "useSparseDiffusion";
1872 static const char __pyx_k_Coefficients___init[] = "Coefficients.__init__";
1873 static const char __pyx_k_PostProcessingTools[] = "PostProcessingTools";
1874 static const char __pyx_k_ShockCapturing_base[] = "ShockCapturing_base";
1875 static const char __pyx_k_SubgridError___init[] = "SubgridError.__init__";
1876 static const char __pyx_k_calculateQuadrature[] = "calculateQuadrature";
1877 static const char __pyx_k_csrColumnOffsets_eb[] = "csrColumnOffsets_eb";
1878 static const char __pyx_k_dirichletConditions[] = "dirichletConditions";
1879 static const char __pyx_k_elementIntegralKeys[] = "elementIntegralKeys";
1880 static const char __pyx_k_initializationPhase[] = "initializationPhase";
1881 static const char __pyx_k_mesh_grad_trial_ref[] = "mesh_grad_trial_ref";
1882 static const char __pyx_k_nDOF_test_elementIn[] = "nDOF_test_elementIn";
1883 static const char __pyx_k_nNonzerosInJacobian[] = "nNonzerosInJacobian";
1884 static const char __pyx_k_TimeIntegrationClass[] = "TimeIntegrationClass";
1885 static const char __pyx_k_conservativeFluxDict[] = "conservativeFluxDict";
1886 static const char __pyx_k_csrColumnOffsets_u_u[] = "csrColumnOffsets_u_u";
1887 static const char __pyx_k_dirichletNodeSetList[] = "dirichletNodeSetList";
1888 static const char __pyx_k_forceStrongDirichlet[] = "forceStrongDirichlet";
1889 static const char __pyx_k_getCSRrepresentation[] = "getCSRrepresentation";
1890 static const char __pyx_k_mesh_trial_trace_ref[] = "mesh_trial_trace_ref";
1891 static const char __pyx_k_nDOF_trial_elementIn[] = "nDOF_trial_elementIn";
1892 static const char __pyx_k_proteus_SubgridError[] = "proteus.SubgridError";
1893 static const char __pyx_k_shockCapturingFactor[] = "shockCapturingFactor";
1894 static const char __pyx_k_Coefficients_evaluate[] = "Coefficients.evaluate";
1895 static const char __pyx_k_DOFBoundaryConditions[] = "DOFBoundaryConditions";
1896 static const char __pyx_k_ShockCapturing___init[] = "ShockCapturing.__init__";
1897 static const char __pyx_k_advectiveFlux_bc_flag[] = "advectiveFlux_bc_flag";
1898 static const char __pyx_k_boundaryAdjoint_sigma[] = "boundaryAdjoint_sigma";
1899 static const char __pyx_k_calculateCoefficients[] = "calculateCoefficients";
1900 static const char __pyx_k_calculateSubgridError[] = "calculateSubgridError";
1901 static const char __pyx_k_diffusiveFlux_bc_flag[] = "diffusiveFlux_bc_flag";
1902 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
1903 static const char __pyx_k_elementQuadratureDict[] = "elementQuadratureDict";
1904 static const char __pyx_k_forceStrongConditions[] = "forceStrongConditions";
1905 static const char __pyx_k_massConservationError[] = "massConservationError";
1906 static const char __pyx_k_u_grad_test_trace_ref[] = "u_grad_test_trace_ref";
1907 static const char __pyx_k_velocityPostProcessor[] = "velocityPostProcessor";
1908 static const char __pyx_k_FluxBoundaryConditions[] = "FluxBoundaryConditions";
1909 static const char __pyx_k_LevelModel_estimate_mt[] = "LevelModel.estimate_mt";
1910 static const char __pyx_k_LevelModel_getJacobian[] = "LevelModel.getJacobian";
1911 static const char __pyx_k_LevelModel_getResidual[] = "LevelModel.getResidual";
1912 static const char __pyx_k_fluxBoundaryConditions[] = "fluxBoundaryConditions";
1913 static const char __pyx_k_getBasisValuesTraceRef[] = "getBasisValuesTraceRef";
1914 static const char __pyx_k_nDOF_phi_trial_element[] = "nDOF_phi_trial_element";
1915 static const char __pyx_k_proteus_ShockCapturing[] = "proteus.ShockCapturing";
1916 static const char __pyx_k_proteus_flcbdfWrappers[] = "proteus.flcbdfWrappers";
1917 static const char __pyx_k_referenceFiniteElement[] = "referenceFiniteElement";
1918 static const char __pyx_k_sparseDiffusionTensors[] = "sparseDiffusionTensors";
1919 static const char __pyx_k_u_grad_trial_trace_ref[] = "u_grad_trial_trace_ref";
1920 static const char __pyx_k_velocity_postprocessor[] = "velocity postprocessor";
1921 static const char __pyx_k_Mass_Conservation_Error[] = " Mass Conservation Error";
1922 static const char __pyx_k_csrColumnOffsets_eb_u_u[] = "csrColumnOffsets_eb_u_u";
1923 static const char __pyx_k_elementQuadraturePoints[] = "elementQuadraturePoints";
1924 static const char __pyx_k_inflowBoundaryBC_values[] = "inflowBoundaryBC_values";
1925 static const char __pyx_k_interpolationConditions[] = "interpolationConditions";
1926 static const char __pyx_k_shockCapturingDiffusion[] = "shockCapturingDiffusion";
1927 static const char __pyx_k_timeVaryingCoefficients[] = "timeVaryingCoefficients";
1928 static const char __pyx_k_weakDirichletConditions[] = "weakDirichletConditions";
1929 static const char __pyx_k_SimplexLobattoQuadrature[] = "SimplexLobattoQuadrature";
1930 static const char __pyx_k_elementBoundaryIntegrals[] = "elementBoundaryIntegrals";
1931 static const char __pyx_k_elementQuadratureWeights[] = "elementQuadratureWeights";
1932 static const char __pyx_k_nQuadraturePoints_global[] = "nQuadraturePoints_global";
1933 static const char __pyx_k_proteus_NonlinearSolvers[] = "proteus.NonlinearSolvers";
1934 static const char __pyx_k_stabilizationIsNonlinear[] = "stabilizationIsNonlinear";
1935 static const char __pyx_k_NumericalFlux_IIPG___init[] = "NumericalFlux_IIPG.__init__";
1936 static const char __pyx_k_NumericalFlux_NIPG___init[] = "NumericalFlux_NIPG.__init__";
1937 static const char __pyx_k_NumericalFlux_SIPG___init[] = "NumericalFlux_SIPG.__init__";
1938 static const char __pyx_k_dofBoundaryConditionsDict[] = "dofBoundaryConditionsDict";
1939 static const char __pyx_k_elementBoundaryQuadrature[] = "elementBoundaryQuadrature";
1940 static const char __pyx_k_getBasisGradientValuesRef[] = "getBasisGradientValuesRef";
1941 static const char __pyx_k_initializeTimeIntegration[] = "initializeTimeIntegration";
1942 static const char __pyx_k_isAdvectiveFluxBoundary_u[] = "isAdvectiveFluxBoundary_u";
1943 static const char __pyx_k_mesh_grad_trial_trace_ref[] = "mesh_grad_trial_trace_ref";
1944 static const char __pyx_k_nDOF_mesh_trial_elementIn[] = "nDOF_mesh_trial_elementIn";
1945 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
1946 static const char __pyx_k_nQuadraturePoints_element[] = "nQuadraturePoints_element";
1947 static const char __pyx_k_updateSubgridErrorHistory[] = "updateSubgridErrorHistory";
1948 static const char __pyx_k_usesGradientStabilization[] = "usesGradientStabilization";
1949 static const char __pyx_k_calculateElementQuadrature[] = "calculateElementQuadrature";
1950 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
1951 static const char __pyx_k_fluxBoundaryConditionsDict[] = "fluxBoundaryConditionsDict";
1952 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
1953 static const char __pyx_k_useWeakDirichletConditions[] = "useWeakDirichletConditions";
1954 static const char __pyx_k_dirichletConditionsForceDOF[] = "dirichletConditionsForceDOF";
1955 static const char __pyx_k_ebqe_bc_advectiveFlux_u_ext[] = "ebqe_bc_advectiveFlux_u_ext";
1956 static const char __pyx_k_elementBoundaryIntegralKeys[] = "elementBoundaryIntegralKeys";
1957 static const char __pyx_k_initializeElementQuadrature[] = "initializeElementQuadrature";
1958 static const char __pyx_k_nQuadraturePoints_elementIn[] = "nQuadraturePoints_elementIn";
1959 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
1960 static const char __pyx_k_periodicDirichletConditions[] = "periodicDirichletConditions";
1961 static const char __pyx_k_reuse_test_trial_quadrature[] = "reuse_test_trial_quadrature";
1962 static const char __pyx_k_updateShockCapturingHistory[] = "updateShockCapturingHistory";
1963 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
1964 static const char __pyx_k_elementQuadratureRuleIndeces[] = "elementQuadratureRuleIndeces";
1965 static const char __pyx_k_getValuesGlobalExteriorTrace[] = "getValuesGlobalExteriorTrace";
1966 static const char __pyx_k_integrateInterpolationPoints[] = "integrateInterpolationPoints";
1967 static const char __pyx_k_VelocityPostProcessingChooser[] = "VelocityPostProcessingChooser";
1968 static const char __pyx_k_calculateSolutionAtQuadrature[] = "calculateSolutionAtQuadrature";
1969 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
1970 static const char __pyx_k_elementBoundaryQuadratureDict[] = "elementBoundaryQuadratureDict";
1971 static const char __pyx_k_proteus_TransportCoefficients[] = "proteus.TransportCoefficients";
1972 static const char __pyx_k_Residual_based_shock_capturing[] = "\n Residual-based shock capturing for ADR equations\n\n .. inheritance-diagram:: ShockCapturing\n :parts: 2\n ";
1973 static const char __pyx_k_SubgridError_approximation_for[] = "\n SubgridError approximation for ADR equations\n\n .. inheritance-diagram:: SubgridError\n :parts: 2\n ";
1974 static const char __pyx_k_elementEffectiveDiametersArray[] = "elementEffectiveDiametersArray";
1975 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
1976 static const char __pyx_k_getBasisGradientValuesTraceRef[] = "getBasisGradientValuesTraceRef";
1977 static const char __pyx_k_getPointwiseBoundaryConditions[] = "getPointwiseBoundaryConditions";
1978 static const char __pyx_k_nonlinear_function_evaluations[] = "nonlinear_function_evaluations";
1979 static const char __pyx_k_proteus_ctransportCoefficients[] = "proteus.ctransportCoefficients";
1980 static const char __pyx_k_An_optimized_Advection_Diffusio[] = "\nAn optimized Advection-Diffusion-Reaction module\n";
1981 static const char __pyx_k_Coefficients_of_linear_ADR_equa[] = "\n Coefficients of linear ADR equations\n\n .. inheritance-diagram:: Coefficients\n :parts: 2\n ";
1982 static const char __pyx_k_Optimized_LevelModel_for_ADR_eq[] = "\n Optimized LevelModel for ADR equations\n\n .. inheritance-diagram:: LevelModel\n :parts: 2\n ";
1983 static const char __pyx_k_dofBoundaryConditionsSetterDict[] = "dofBoundaryConditionsSetterDict";
1984 static const char __pyx_k_elementBoundaryQuadraturePoints[] = "elementBoundaryQuadraturePoints";
1985 static const char __pyx_k_home_cekees_proteus_proteus_ADR[] = "/home/cekees/proteus/proteus/ADR.pyx";
1986 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
1987 static const char __pyx_k_reuse_trial_and_test_quadrature[] = "reuse_trial_and_test_quadrature";
1988 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
1989 static const char __pyx_k_ADR_ShockCapturing_lagging_reque[] = "ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying";
1990 static const char __pyx_k_ADR_ShockCapturing_switched_to_l[] = "ADR.ShockCapturing: switched to lagged shock capturing";
1991 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi[] = "Advection_DiagonalUpwind_Diffusion_IIPG_exterior";
1992 static const char __pyx_k_Building_time_integration_object[] = "Building time integration object";
1993 static const char __pyx_k_C0_AffineLinearOnSimplexWithNoda[] = "C0_AffineLinearOnSimplexWithNodalBasis";
1994 static const char __pyx_k_Calculating_numerical_quadrature[] = "Calculating numerical quadrature formulas";
1995 static const char __pyx_k_Coefficients_initializeElementBo[] = "Coefficients.initializeElementBoundaryQuadrature";
1996 static const char __pyx_k_Coefficients_initializeElementQu[] = "Coefficients.initializeElementQuadrature";
1997 static const char __pyx_k_Coefficients_initializeGlobalExt[] = "Coefficients.initializeGlobalExteriorElementBoundaryQuadrature";
1998 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
1999 static const char __pyx_k_LevelModel_calculateAuxiliaryQua[] = "LevelModel.calculateAuxiliaryQuantitiesAfterStep";
2000 static const char __pyx_k_LevelModel_calculateCoefficients[] = "LevelModel.calculateCoefficients";
2001 static const char __pyx_k_LevelModel_calculateElementBound[] = "LevelModel.calculateElementBoundaryQuadrature";
2002 static const char __pyx_k_LevelModel_calculateElementQuadr[] = "LevelModel.calculateElementQuadrature";
2003 static const char __pyx_k_LevelModel_calculateExteriorElem[] = "LevelModel.calculateExteriorElementBoundaryQuadrature";
2004 static const char __pyx_k_LevelModel_calculateSolutionAtQu[] = "LevelModel.calculateSolutionAtQuadrature";
2005 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2006 static const char __pyx_k_ShockCapturing_initializeElement[] = "ShockCapturing.initializeElementQuadrature";
2007 static const char __pyx_k_ShockCapturing_updateShockCaptur[] = "ShockCapturing.updateShockCapturingHistory";
2008 static const char __pyx_k_SubgridError_calculateSubgridErr[] = "SubgridError.calculateSubgridError";
2009 static const char __pyx_k_SubgridError_initializeElementQu[] = "SubgridError.initializeElementQuadrature";
2010 static const char __pyx_k_SubgridError_updateSubgridErrorH[] = "SubgridError.updateSubgridErrorHistory";
2011 static const char __pyx_k_Updating_local_to_global_mapping[] = "Updating local to global mappings";
2012 static const char __pyx_k_You_must_use_a_numerical_flux_to[] = "You must use a numerical flux to apply weak boundary conditions for parallel runs";
2013 static const char __pyx_k_advectiveFluxBoundaryConditionsD[] = "advectiveFluxBoundaryConditionsDict";
2014 static const char __pyx_k_advectiveFluxBoundaryConditionsS[] = "advectiveFluxBoundaryConditionsSetterDict";
2015 static const char __pyx_k_calculateAuxiliaryQuantitiesAfte[] = "calculateAuxiliaryQuantitiesAfterStep";
2016 static const char __pyx_k_calculateElementBoundaryQuadratu[] = "calculateElementBoundaryQuadrature";
2017 static const char __pyx_k_calculateExteriorElementBoundary[] = "calculateExteriorElementBoundaryQuadrature";
2018 static const char __pyx_k_diffusiveFluxBoundaryConditionsD[] = "diffusiveFluxBoundaryConditionsDictDict";
2019 static const char __pyx_k_diffusiveFluxBoundaryConditionsS[] = "diffusiveFluxBoundaryConditionsSetterDictDict";
2020 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2021 static const char __pyx_k_elementBoundaryQuadratureDiction[] = "elementBoundaryQuadratureDictionaryWriter";
2022 static const char __pyx_k_elementBoundaryQuadratureRuleInd[] = "elementBoundaryQuadratureRuleIndeces";
2023 static const char __pyx_k_elementBoundaryQuadratureWeights[] = "elementBoundaryQuadratureWeights";
2024 static const char __pyx_k_elementQuadratureDictionaryWrite[] = "elementQuadratureDictionaryWriter";
2025 static const char __pyx_k_element_and_element_boundary_Jac[] = "element and element boundary Jacobians";
2026 static const char __pyx_k_exteriorElementBoundaryQuadratur[] = "exteriorElementBoundaryQuadratureDictionaryWriter";
2027 static const char __pyx_k_fluxBoundaryConditionsObjectsDic[] = "fluxBoundaryConditionsObjectsDict";
2028 static const char __pyx_k_getAdvectiveFluxBoundaryConditio[] = "getAdvectiveFluxBoundaryConditions";
2029 static const char __pyx_k_getDiffusiveFluxBoundaryConditio[] = "getDiffusiveFluxBoundaryConditions";
2030 static const char __pyx_k_inflowBC_internalNodes_updateLoc[] = "inflowBC, internalNodes,updateLocal2Global";
2031 static const char __pyx_k_initializeElementBoundaryQuadrat[] = "initializeElementBoundaryQuadrature";
2032 static const char __pyx_k_initializeGlobalExteriorElementB[] = "initializeGlobalExteriorElementBoundaryQuadrature";
2033 static const char __pyx_k_nElementBoundaryQuadraturePoints[] = "nElementBoundaryQuadraturePoints_elementBoundary";
2034 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2035 static const char __pyx_k_nQuadraturePoints_elementBoundar[] = "nQuadraturePoints_elementBoundaryIn";
2036 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2037 static const char __pyx_k_nonlinear_function_jacobian_eval[] = "nonlinear_function_jacobian_evaluations";
2038 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2039 static const char __pyx_k_points_elementBoundaryQuadrature[] = "points_elementBoundaryQuadrature";
2040 static const char __pyx_k_scalars_elementBoundaryQuadratur[] = "scalars_elementBoundaryQuadrature";
2041 static const char __pyx_k_stressTraceBoundaryConditionsSet[] = "stressTraceBoundaryConditionsSetterDict";
2042 static const char __pyx_k_tensors_elementBoundaryQuadratur[] = "tensors_elementBoundaryQuadrature";
2043 static const char __pyx_k_to_reuse_test_trial_quad_all_fem[] = "to reuse_test_trial_quad all femSpaces must be the same!";
2044 static const char __pyx_k_vectors_elementBoundaryQuadratur[] = "vectors_elementBoundaryQuadrature";
2045 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_2[] = "Advection_DiagonalUpwind_Diffusion_SIPG_exterior";
2046 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_3[] = "Advection_DiagonalUpwind_Diffusion_NIPG_exterior";
2047 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2048 static const char __pyx_k_diffusiveFluxBoundaryConditionsD_2[] = "diffusiveFluxBoundaryConditionsDict";
2049 static const char __pyx_k_nElementBoundaryQuadraturePoints_2[] = "nElementBoundaryQuadraturePoints_global";
2050 static PyObject *__pyx_n_s_ADR;
2051 static PyObject *__pyx_kp_s_ADR_ShockCapturing_lagging_reque;
2052 static PyObject *__pyx_kp_s_ADR_ShockCapturing_switched_to_l;
2053 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi;
2054 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2;
2055 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3;
2056 static PyObject *__pyx_n_s_Archiver;
2057 static PyObject *__pyx_kp_s_Building_time_integration_object;
2058 static PyObject *__pyx_n_s_C0_AffineLinearOnSimplexWithNoda;
2059 static PyObject *__pyx_n_s_CT_sge;
2060 static PyObject *__pyx_kp_s_Calculating_numerical_quadrature;
2061 static PyObject *__pyx_n_s_Coefficients;
2062 static PyObject *__pyx_n_s_Coefficients___init;
2063 static PyObject *__pyx_n_s_Coefficients_evaluate;
2064 static PyObject *__pyx_n_s_Coefficients_initializeElementBo;
2065 static PyObject *__pyx_n_s_Coefficients_initializeElementQu;
2066 static PyObject *__pyx_n_s_Coefficients_initializeGlobalExt;
2067 static PyObject *__pyx_kp_s_Coefficients_of_linear_ADR_equa;
2068 static PyObject *__pyx_n_s_Comm;
2069 static PyObject *__pyx_n_s_CompKernelFlag;
2070 static PyObject *__pyx_n_s_DOFBoundaryConditions;
2071 static PyObject *__pyx_n_s_FluxBoundaryConditions;
2072 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2073 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2074 static PyObject *__pyx_kp_s_Global_residual;
2075 static PyObject *__pyx_n_s_Hess;
2076 static PyObject *__pyx_n_s_I;
2077 static PyObject *__pyx_n_s_ImportError;
2078 static PyObject *__pyx_kp_s_Jacobian;
2079 static PyObject *__pyx_n_s_L2projectEvaluate;
2080 static PyObject *__pyx_n_s_LevelModel;
2081 static PyObject *__pyx_n_s_LevelModel___init;
2082 static PyObject *__pyx_n_s_LevelModel_calculateAuxiliaryQua;
2083 static PyObject *__pyx_n_s_LevelModel_calculateCoefficients;
2084 static PyObject *__pyx_n_s_LevelModel_calculateElementBound;
2085 static PyObject *__pyx_n_s_LevelModel_calculateElementQuadr;
2086 static PyObject *__pyx_n_s_LevelModel_calculateExteriorElem;
2087 static PyObject *__pyx_n_s_LevelModel_calculateSolutionAtQu;
2088 static PyObject *__pyx_n_s_LevelModel_estimate_mt;
2089 static PyObject *__pyx_n_s_LevelModel_getJacobian;
2090 static PyObject *__pyx_n_s_LevelModel_getResidual;
2091 static PyObject *__pyx_n_s_MOVING_DOMAIN;
2092 static PyObject *__pyx_kp_s_Mass_Conservation_Error;
2093 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2094 static PyObject *__pyx_n_s_NonlinearEquation;
2095 static PyObject *__pyx_n_s_NumericalFlux;
2096 static PyObject *__pyx_n_s_NumericalFlux_IIPG;
2097 static PyObject *__pyx_n_s_NumericalFlux_IIPG___init;
2098 static PyObject *__pyx_n_s_NumericalFlux_NIPG;
2099 static PyObject *__pyx_n_s_NumericalFlux_NIPG___init;
2100 static PyObject *__pyx_n_s_NumericalFlux_SIPG;
2101 static PyObject *__pyx_n_s_NumericalFlux_SIPG___init;
2102 static PyObject *__pyx_n_s_OneLevelTransport;
2103 static PyObject *__pyx_kp_s_Optimized_LevelModel_for_ADR_eq;
2104 static PyObject *__pyx_n_s_PostProcessingTools;
2105 static PyObject *__pyx_n_s_Quadrature;
2106 static PyObject *__pyx_kp_s_Residual_based_shock_capturing;
2107 static PyObject *__pyx_n_s_RuntimeError;
2108 static PyObject *__pyx_n_s_SGE_base;
2109 static PyObject *__pyx_n_s_ShockCapturing;
2110 static PyObject *__pyx_n_s_ShockCapturing___init;
2111 static PyObject *__pyx_n_s_ShockCapturing_base;
2112 static PyObject *__pyx_n_s_ShockCapturing_initializeElement;
2113 static PyObject *__pyx_n_s_ShockCapturing_updateShockCaptur;
2114 static PyObject *__pyx_n_s_SimplexLobattoQuadrature;
2115 static PyObject *__pyx_n_s_SubgridError;
2116 static PyObject *__pyx_n_s_SubgridError___init;
2117 static PyObject *__pyx_kp_s_SubgridError_approximation_for;
2118 static PyObject *__pyx_n_s_SubgridError_calculateSubgridErr;
2119 static PyObject *__pyx_n_s_SubgridError_initializeElementQu;
2120 static PyObject *__pyx_n_s_SubgridError_updateSubgridErrorH;
2121 static PyObject *__pyx_n_s_TC_base;
2122 static PyObject *__pyx_n_s_TimeIntegration;
2123 static PyObject *__pyx_n_s_TimeIntegrationClass;
2124 static PyObject *__pyx_n_s_Transport;
2125 static PyObject *__pyx_kp_s_Updating_local_to_global_mapping;
2126 static PyObject *__pyx_kp_s_VOF_max_numDiff_e;
2127 static PyObject *__pyx_n_s_ValueError;
2128 static PyObject *__pyx_n_s_VelocityPostProcessingChooser;
2129 static PyObject *__pyx_n_s_XdmfWriter;
2130 static PyObject *__pyx_kp_s_You_must_use_a_numerical_flux_to;
2131 static PyObject *__pyx_n_s_a;
2132 static PyObject *__pyx_n_s_aOfX;
2133 static PyObject *__pyx_n_s_adjoint_sigma;
2134 static PyObject *__pyx_n_s_adr;
2135 static PyObject *__pyx_n_s_advection;
2136 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsD;
2137 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsS;
2138 static PyObject *__pyx_n_s_advectiveFlux_bc;
2139 static PyObject *__pyx_n_s_advectiveFlux_bc_flag;
2140 static PyObject *__pyx_n_s_append;
2141 static PyObject *__pyx_n_s_arange;
2142 static PyObject *__pyx_n_s_array;
2143 static PyObject *__pyx_n_s_boundaryAdjoint_sigma;
2144 static PyObject *__pyx_n_s_boundaryJac_ref;
2145 static PyObject *__pyx_n_s_boundaryJacobians;
2146 static PyObject *__pyx_n_s_boundaryNormals;
2147 static PyObject *__pyx_n_s_buildUnion;
2148 static PyObject *__pyx_n_s_c;
2149 static PyObject *__pyx_n_s_calculateAuxiliaryQuantitiesAfte;
2150 static PyObject *__pyx_n_s_calculateCoefficients;
2151 static PyObject *__pyx_n_s_calculateElementBoundaryQuadratu;
2152 static PyObject *__pyx_n_s_calculateElementQuadrature;
2153 static PyObject *__pyx_n_s_calculateExteriorElementBoundary;
2154 static PyObject *__pyx_n_s_calculateJacobian;
2155 static PyObject *__pyx_n_s_calculateQuadrature;
2156 static PyObject *__pyx_n_s_calculateResidual;
2157 static PyObject *__pyx_n_s_calculateSolutionAtQuadrature;
2158 static PyObject *__pyx_n_s_calculateSubgridError;
2159 static PyObject *__pyx_n_s_cebq;
2160 static PyObject *__pyx_n_s_cebq_global;
2161 static PyObject *__pyx_n_s_cebqe;
2162 static PyObject *__pyx_n_s_cfemIntegrals;
2163 static PyObject *__pyx_n_s_cfl;
2164 static PyObject *__pyx_n_s_ci;
2165 static PyObject *__pyx_n_s_cj;
2166 static PyObject *__pyx_n_s_ck;
2167 static PyObject *__pyx_n_s_class;
2168 static PyObject *__pyx_n_s_coefficients;
2169 static PyObject *__pyx_n_s_comm;
2170 static PyObject *__pyx_n_s_compKernelFlag;
2171 static PyObject *__pyx_n_s_components;
2172 static PyObject *__pyx_n_s_conservativeFlux;
2173 static PyObject *__pyx_n_s_conservativeFluxDict;
2174 static PyObject *__pyx_n_s_constant;
2175 static PyObject *__pyx_n_s_copy;
2176 static PyObject *__pyx_n_s_cq;
2177 static PyObject *__pyx_n_s_csrColumnOffsets;
2178 static PyObject *__pyx_n_s_csrColumnOffsets_eb;
2179 static PyObject *__pyx_n_s_csrColumnOffsets_eb_u_u;
2180 static PyObject *__pyx_n_s_csrColumnOffsets_u_u;
2181 static PyObject *__pyx_n_s_csrRowIndeces;
2182 static PyObject *__pyx_n_s_csrRowIndeces_u_u;
2183 static PyObject *__pyx_n_s_d;
2184 static PyObject *__pyx_n_s_dS_ref;
2185 static PyObject *__pyx_n_s_dV_ref;
2186 static PyObject *__pyx_n_s_data;
2187 static PyObject *__pyx_n_s_dc;
2188 static PyObject *__pyx_n_s_default;
2189 static PyObject *__pyx_n_s_defaultName;
2190 static PyObject *__pyx_n_s_df;
2191 static PyObject *__pyx_n_s_diffusion;
2192 static PyObject *__pyx_n_s_diffusionDict;
2193 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD;
2194 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD_2;
2195 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsS;
2196 static PyObject *__pyx_n_s_diffusiveFlux_bc;
2197 static PyObject *__pyx_n_s_diffusiveFlux_bc_flag;
2198 static PyObject *__pyx_n_s_dim;
2199 static PyObject *__pyx_n_s_dirichletConditions;
2200 static PyObject *__pyx_n_s_dirichletConditionsForceDOF;
2201 static PyObject *__pyx_n_s_dirichletNodeSetList;
2202 static PyObject *__pyx_n_s_doc;
2203 static PyObject *__pyx_n_s_dof;
2204 static PyObject *__pyx_n_s_dofBoundaryConditionsDict;
2205 static PyObject *__pyx_n_s_dofBoundaryConditionsSetterDict;
2206 static PyObject *__pyx_n_s_dofMap;
2207 static PyObject *__pyx_n_s_dphi;
2208 static PyObject *__pyx_n_s_dtype;
2209 static PyObject *__pyx_n_s_eN_global;
2210 static PyObject *__pyx_n_s_ebN;
2211 static PyObject *__pyx_n_s_ebNE;
2212 static PyObject *__pyx_n_s_ebN_element;
2213 static PyObject *__pyx_n_s_ebq;
2214 static PyObject *__pyx_n_s_ebq_global;
2215 static PyObject *__pyx_n_s_ebqe;
2216 static PyObject *__pyx_n_s_ebqe_a;
2217 static PyObject *__pyx_n_s_ebqe_bc_advectiveFlux_u_ext;
2218 static PyObject *__pyx_n_s_ebqe_bc_flux_u_ext;
2219 static PyObject *__pyx_n_s_ebqe_bc_u_ext;
2220 static PyObject *__pyx_n_s_ebqe_penalty;
2221 static PyObject *__pyx_n_s_ebqe_v;
2222 static PyObject *__pyx_n_s_elemQuadIsDict;
2223 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2224 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2225 static PyObject *__pyx_n_s_elementBoundaryIntegralKeys;
2226 static PyObject *__pyx_n_s_elementBoundaryIntegrals;
2227 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2228 static PyObject *__pyx_n_s_elementBoundaryQuadrature;
2229 static PyObject *__pyx_n_s_elementBoundaryQuadratureDict;
2230 static PyObject *__pyx_n_s_elementBoundaryQuadratureDiction;
2231 static PyObject *__pyx_n_s_elementBoundaryQuadraturePoints;
2232 static PyObject *__pyx_n_s_elementBoundaryQuadratureRuleInd;
2233 static PyObject *__pyx_n_s_elementBoundaryQuadratureWeights;
2234 static PyObject *__pyx_n_s_elementDiameter;
2235 static PyObject *__pyx_n_s_elementDiametersArray;
2236 static PyObject *__pyx_n_s_elementEffectiveDiametersArray;
2237 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2238 static PyObject *__pyx_n_s_elementIntegralKeys;
2239 static PyObject *__pyx_n_s_elementMaps;
2240 static PyObject *__pyx_n_s_elementNodesArray;
2241 static PyObject *__pyx_n_s_elementQuadrature;
2242 static PyObject *__pyx_n_s_elementQuadratureDict;
2243 static PyObject *__pyx_n_s_elementQuadratureDictionaryWrite;
2244 static PyObject *__pyx_n_s_elementQuadraturePoints;
2245 static PyObject *__pyx_n_s_elementQuadratureRuleIndeces;
2246 static PyObject *__pyx_n_s_elementQuadratureWeights;
2247 static PyObject *__pyx_kp_s_element_and_element_boundary_Jac;
2248 static PyObject *__pyx_n_s_enumerate;
2249 static PyObject *__pyx_n_s_estimate_mt;
2250 static PyObject *__pyx_n_s_evaluate;
2251 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2252 static PyObject *__pyx_n_s_exteriorElementBoundaryQuadratur;
2253 static PyObject *__pyx_n_s_fOfX;
2254 static PyObject *__pyx_n_s_fabs;
2255 static PyObject *__pyx_n_s_fbcObject;
2256 static PyObject *__pyx_n_s_femSpace;
2257 static PyObject *__pyx_n_s_fill;
2258 static PyObject *__pyx_n_s_flag;
2259 static PyObject *__pyx_n_s_flat;
2260 static PyObject *__pyx_n_s_fluxBoundaryConditions;
2261 static PyObject *__pyx_n_s_fluxBoundaryConditionsDict;
2262 static PyObject *__pyx_n_s_fluxBoundaryConditionsObjectsDic;
2263 static PyObject *__pyx_n_s_forceStrongConditions;
2264 static PyObject *__pyx_n_s_forceStrongDirichlet;
2265 static PyObject *__pyx_n_s_g;
2266 static PyObject *__pyx_n_s_get;
2267 static PyObject *__pyx_n_s_getAdvectiveFluxBoundaryConditio;
2268 static PyObject *__pyx_n_s_getBasisGradientValuesRef;
2269 static PyObject *__pyx_n_s_getBasisGradientValuesTraceRef;
2270 static PyObject *__pyx_n_s_getBasisValuesRef;
2271 static PyObject *__pyx_n_s_getBasisValuesTraceRef;
2272 static PyObject *__pyx_n_s_getCSRrepresentation;
2273 static PyObject *__pyx_n_s_getDiffusiveFluxBoundaryConditio;
2274 static PyObject *__pyx_n_s_getJacobian;
2275 static PyObject *__pyx_n_s_getPointwiseBoundaryConditions;
2276 static PyObject *__pyx_n_s_getResidual;
2277 static PyObject *__pyx_n_s_getValues;
2278 static PyObject *__pyx_n_s_getValuesGlobalExteriorTrace;
2279 static PyObject *__pyx_n_s_globalJacobian;
2280 static PyObject *__pyx_n_s_globalMax;
2281 static PyObject *__pyx_n_s_globalResidual;
2282 static PyObject *__pyx_n_s_globalSum;
2283 static PyObject *__pyx_n_s_grad_psi;
2284 static PyObject *__pyx_n_s_grad_psi_trace;
2285 static PyObject *__pyx_kp_s_grad_u;
2286 static PyObject *__pyx_n_s_hamiltonian;
2287 static PyObject *__pyx_n_s_has_key;
2288 static PyObject *__pyx_kp_s_home_cekees_proteus_proteus_ADR;
2289 static PyObject *__pyx_n_s_i;
2290 static PyObject *__pyx_n_s_import;
2291 static PyObject *__pyx_kp_s_inflowBC_internalNodes_updateLoc;
2292 static PyObject *__pyx_n_s_inflowBoundaryBC;
2293 static PyObject *__pyx_n_s_inflowBoundaryBC_values;
2294 static PyObject *__pyx_n_s_inflowFlux;
2295 static PyObject *__pyx_n_s_init;
2296 static PyObject *__pyx_n_s_initializationPhase;
2297 static PyObject *__pyx_n_s_initializeElementBoundaryQuadrat;
2298 static PyObject *__pyx_n_s_initializeElementQuadrature;
2299 static PyObject *__pyx_n_s_initializeGlobalExteriorElementB;
2300 static PyObject *__pyx_n_s_initializeMesh;
2301 static PyObject *__pyx_n_s_initializeTimeIntegration;
2302 static PyObject *__pyx_n_s_integrateInterpolationPoints;
2303 static PyObject *__pyx_n_s_internalNodes;
2304 static PyObject *__pyx_n_s_internalNodesArray;
2305 static PyObject *__pyx_n_s_interpolationConditions;
2306 static PyObject *__pyx_n_s_isAdvectiveFluxBoundary_u;
2307 static PyObject *__pyx_n_s_isDOFBoundary;
2308 static PyObject *__pyx_n_s_isDOFBoundary_u;
2309 static PyObject *__pyx_n_s_isFluxBoundary_u;
2310 static PyObject *__pyx_n_s_iteritems;
2311 static PyObject *__pyx_n_s_jacobian;
2312 static PyObject *__pyx_n_s_k;
2313 static PyObject *__pyx_n_s_keys;
2314 static PyObject *__pyx_n_s_l2g;
2315 static PyObject *__pyx_n_s_l2proj;
2316 static PyObject *__pyx_n_s_lag;
2317 static PyObject *__pyx_n_s_lag_shockCapturing;
2318 static PyObject *__pyx_n_s_level;
2319 static PyObject *__pyx_n_s_linear;
2320 static PyObject *__pyx_n_s_localFunctionSpace;
2321 static PyObject *__pyx_n_s_log;
2322 static PyObject *__pyx_n_s_logEvent;
2323 static PyObject *__pyx_n_s_lowmem;
2324 static PyObject *__pyx_n_s_m;
2325 static PyObject *__pyx_n_s_main;
2326 static PyObject *__pyx_n_s_mass;
2327 static PyObject *__pyx_n_s_massConservationError;
2328 static PyObject *__pyx_n_s_massLumping;
2329 static PyObject *__pyx_n_s_matType;
2330 static PyObject *__pyx_n_s_math;
2331 static PyObject *__pyx_n_s_max;
2332 static PyObject *__pyx_n_s_max_nDOF_element;
2333 static PyObject *__pyx_n_s_memory;
2334 static PyObject *__pyx_n_s_mesh;
2335 static PyObject *__pyx_n_s_mesh_dof;
2336 static PyObject *__pyx_n_s_mesh_grad_trial_ref;
2337 static PyObject *__pyx_n_s_mesh_grad_trial_trace_ref;
2338 static PyObject *__pyx_n_s_mesh_l2g;
2339 static PyObject *__pyx_n_s_mesh_trial_ref;
2340 static PyObject *__pyx_n_s_mesh_trial_trace_ref;
2341 static PyObject *__pyx_n_s_metaclass;
2342 static PyObject *__pyx_n_s_mixedFlow;
2343 static PyObject *__pyx_n_s_module;
2344 static PyObject *__pyx_n_s_movingDomain;
2345 static PyObject *__pyx_n_s_n;
2346 static PyObject *__pyx_n_s_nCalls;
2347 static PyObject *__pyx_n_s_nDOF_mesh_trial_elementIn;
2348 static PyObject *__pyx_n_s_nDOF_phi_trial_element;
2349 static PyObject *__pyx_n_s_nDOF_test_element;
2350 static PyObject *__pyx_n_s_nDOF_test_elementIn;
2351 static PyObject *__pyx_n_s_nDOF_trial_element;
2352 static PyObject *__pyx_n_s_nDOF_trial_elementIn;
2353 static PyObject *__pyx_n_s_nElementBoundaries_element;
2354 static PyObject *__pyx_n_s_nElementBoundaries_global;
2355 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints;
2356 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints_2;
2357 static PyObject *__pyx_n_s_nElements_global;
2358 static PyObject *__pyx_n_s_nElements_owned;
2359 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2360 static PyObject *__pyx_n_s_nFreeDOF_global;
2361 static PyObject *__pyx_n_s_nFreeVDOF_global;
2362 static PyObject *__pyx_n_s_nI;
2363 static PyObject *__pyx_n_s_nNodes_element;
2364 static PyObject *__pyx_n_s_nNodes_global;
2365 static PyObject *__pyx_n_s_nNodes_internal;
2366 static PyObject *__pyx_n_s_nNonzerosInJacobian;
2367 static PyObject *__pyx_n_s_nQuadraturePoints;
2368 static PyObject *__pyx_n_s_nQuadraturePoints_element;
2369 static PyObject *__pyx_n_s_nQuadraturePoints_elementBoundar;
2370 static PyObject *__pyx_n_s_nQuadraturePoints_elementIn;
2371 static PyObject *__pyx_n_s_nQuadraturePoints_global;
2372 static PyObject *__pyx_n_s_nSpaceIn;
2373 static PyObject *__pyx_n_s_nSpace_global;
2374 static PyObject *__pyx_n_s_nSteps;
2375 static PyObject *__pyx_n_s_nStepsToDelay;
2376 static PyObject *__pyx_n_s_nVDOF_element;
2377 static PyObject *__pyx_n_s_n_phi_ip_element;
2378 static PyObject *__pyx_n_s_name;
2379 static PyObject *__pyx_n_s_name_2;
2380 static PyObject *__pyx_n_s_nc;
2381 static PyObject *__pyx_n_s_nd;
2382 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2383 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2384 static PyObject *__pyx_n_s_nodeArray;
2385 static PyObject *__pyx_n_s_nodeVelocityArray;
2386 static PyObject *__pyx_n_s_nonlinear;
2387 static PyObject *__pyx_n_s_nonlinear_function_evaluations;
2388 static PyObject *__pyx_n_s_nonlinear_function_jacobian_eval;
2389 static PyObject *__pyx_n_s_normal_ref;
2390 static PyObject *__pyx_n_s_numDiff;
2391 static PyObject *__pyx_n_s_numDiff_last;
2392 static PyObject *__pyx_n_s_numericalFlux;
2393 static PyObject *__pyx_n_s_numericalFluxType;
2394 static PyObject *__pyx_n_s_numpy;
2395 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2396 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2397 static PyObject *__pyx_n_s_offset;
2398 static PyObject *__pyx_n_s_offset_u;
2399 static PyObject *__pyx_n_s_options;
2400 static PyObject *__pyx_n_s_outFlow;
2401 static PyObject *__pyx_n_s_pdb;
2402 static PyObject *__pyx_n_s_penalty;
2403 static PyObject *__pyx_n_s_penalty_constant;
2404 static PyObject *__pyx_n_s_penalty_power;
2405 static PyObject *__pyx_n_s_periodicDirichletConditions;
2406 static PyObject *__pyx_n_s_phi;
2407 static PyObject *__pyx_n_s_phiDict;
2408 static PyObject *__pyx_n_s_phiTrialIsTrial;
2409 static PyObject *__pyx_n_s_phi_ip;
2410 static PyObject *__pyx_n_s_phi_k;
2411 static PyObject *__pyx_n_s_points_elementBoundaryQuadrature;
2412 static PyObject *__pyx_n_s_potential;
2413 static PyObject *__pyx_n_s_prepare;
2414 static PyObject *__pyx_n_s_proteus;
2415 static PyObject *__pyx_n_s_proteus_FemTools;
2416 static PyObject *__pyx_n_s_proteus_NonlinearSolvers;
2417 static PyObject *__pyx_n_s_proteus_Profiling;
2418 static PyObject *__pyx_n_s_proteus_ShockCapturing;
2419 static PyObject *__pyx_n_s_proteus_SubgridError;
2420 static PyObject *__pyx_n_s_proteus_Transport;
2421 static PyObject *__pyx_n_s_proteus_TransportCoefficients;
2422 static PyObject *__pyx_n_s_proteus_ctransportCoefficients;
2423 static PyObject *__pyx_n_s_proteus_flcbdfWrappers;
2424 static PyObject *__pyx_n_s_psi;
2425 static PyObject *__pyx_n_s_psi_trace;
2426 static PyObject *__pyx_n_s_q;
2427 static PyObject *__pyx_n_s_q_a;
2428 static PyObject *__pyx_n_s_q_numDiff_u;
2429 static PyObject *__pyx_n_s_q_numDiff_u_last;
2430 static PyObject *__pyx_n_s_q_r;
2431 static PyObject *__pyx_n_s_q_v;
2432 static PyObject *__pyx_n_s_qualname;
2433 static PyObject *__pyx_n_s_r;
2434 static PyObject *__pyx_n_s_range;
2435 static PyObject *__pyx_n_s_reaction;
2436 static PyObject *__pyx_n_s_reactionLumping;
2437 static PyObject *__pyx_n_s_referenceFiniteElement;
2438 static PyObject *__pyx_n_s_reuse_test_trial_quadrature;
2439 static PyObject *__pyx_n_s_reuse_trial_and_test_quadrature;
2440 static PyObject *__pyx_n_s_row;
2441 static PyObject *__pyx_n_s_sc_alpha;
2442 static PyObject *__pyx_n_s_sc_beta;
2443 static PyObject *__pyx_n_s_sc_uref;
2444 static PyObject *__pyx_n_s_scalars_elementBoundaryQuadratur;
2445 static PyObject *__pyx_n_s_sd;
2446 static PyObject *__pyx_n_s_sdInfo;
2447 static PyObject *__pyx_n_s_sdInfo_u_u_colind;
2448 static PyObject *__pyx_n_s_sdInfo_u_u_rowptr;
2449 static PyObject *__pyx_n_s_self;
2450 static PyObject *__pyx_n_s_setDirichletValues;
2451 static PyObject *__pyx_n_s_setFlow;
2452 static PyObject *__pyx_n_s_setFromOptions;
2453 static PyObject *__pyx_n_s_setUnknowns;
2454 static PyObject *__pyx_n_s_setupFieldStrides;
2455 static PyObject *__pyx_n_s_shape;
2456 static PyObject *__pyx_n_s_shockCapturing;
2457 static PyObject *__pyx_n_s_shockCapturingDiffusion;
2458 static PyObject *__pyx_n_s_shockCapturingFactor;
2459 static PyObject *__pyx_n_s_size;
2460 static PyObject *__pyx_n_s_sparseDiffusionTensors;
2461 static PyObject *__pyx_n_s_stab;
2462 static PyObject *__pyx_n_s_stabilization;
2463 static PyObject *__pyx_n_s_stabilizationIsNonlinear;
2464 static PyObject *__pyx_n_s_start;
2465 static PyObject *__pyx_n_s_step;
2466 static PyObject *__pyx_n_s_stop;
2467 static PyObject *__pyx_n_s_stressTraceBoundaryConditionsSet;
2468 static PyObject *__pyx_n_s_stride;
2469 static PyObject *__pyx_kp_s_stride_offset;
2470 static PyObject *__pyx_n_s_stride_u;
2471 static PyObject *__pyx_n_s_sum;
2472 static PyObject *__pyx_n_s_t;
2473 static PyObject *__pyx_n_s_tLast_mesh;
2474 static PyObject *__pyx_n_s_tensors_elementBoundaryQuadratur;
2475 static PyObject *__pyx_n_s_test;
2476 static PyObject *__pyx_n_s_testIsTrial;
2477 static PyObject *__pyx_n_s_testSpace;
2478 static PyObject *__pyx_n_s_testSpaceDict;
2479 static PyObject *__pyx_n_s_timeIntegration;
2480 static PyObject *__pyx_n_s_timeTerm;
2481 static PyObject *__pyx_n_s_timeVaryingCoefficients;
2482 static PyObject *__pyx_kp_s_to_reuse_test_trial_quad_all_fem;
2483 static PyObject *__pyx_n_s_u;
2484 static PyObject *__pyx_n_s_uDict;
2485 static PyObject *__pyx_n_s_u_dof;
2486 static PyObject *__pyx_n_s_u_grad_test_ref;
2487 static PyObject *__pyx_n_s_u_grad_test_trace_ref;
2488 static PyObject *__pyx_n_s_u_grad_trial_ref;
2489 static PyObject *__pyx_n_s_u_grad_trial_trace_ref;
2490 static PyObject *__pyx_n_s_u_j;
2491 static PyObject *__pyx_n_s_u_l2g;
2492 static PyObject *__pyx_n_s_u_test_ref;
2493 static PyObject *__pyx_n_s_u_test_trace_ref;
2494 static PyObject *__pyx_n_s_u_trial_ref;
2495 static PyObject *__pyx_n_s_u_trial_trace_ref;
2496 static PyObject *__pyx_n_s_ua;
2497 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2498 static PyObject *__pyx_n_s_updateLocal2Global;
2499 static PyObject *__pyx_n_s_updateShockCapturingHistory;
2500 static PyObject *__pyx_n_s_updateSubgridErrorHistory;
2501 static PyObject *__pyx_n_s_useMetrics;
2502 static PyObject *__pyx_n_s_useSparseDiffusion;
2503 static PyObject *__pyx_n_s_useWeakDirichletConditions;
2504 static PyObject *__pyx_n_s_usesGradientStabilization;
2505 static PyObject *__pyx_n_s_values;
2506 static PyObject *__pyx_n_s_variableNames;
2507 static PyObject *__pyx_n_s_vectors_elementBoundaryQuadratur;
2508 static PyObject *__pyx_n_s_velocity;
2509 static PyObject *__pyx_n_s_velocityPostProcessor;
2510 static PyObject *__pyx_kp_s_velocity_postprocessor;
2511 static PyObject *__pyx_n_s_vt;
2512 static PyObject *__pyx_n_s_weakDirichletConditions;
2513 static PyObject *__pyx_n_s_x;
2514 static PyObject *__pyx_n_s_zeroJacobian_CSR;
2515 static PyObject *__pyx_n_s_zeros;
2516 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag); /* proto */
2517 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self); /* proto */
2518 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2519 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2520 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd); /* proto */
2521 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq); /* proto */
2522 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase); /* proto */
2523 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q); /* proto */
2524 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay); /* proto */
2525 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2526 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2527 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2528 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2529 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2530 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta); /* proto */
2531 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2532 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global); /* proto */
2533 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe); /* proto */
2534 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c); /* proto */
2535 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain); /* proto */
2536 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2537 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r); /* proto */
2538 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian); /* proto */
2539 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2540 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2541 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2542 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2543 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2544 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2545 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2546 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2547 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2548 static PyObject *__pyx_float_0_0;
2549 static PyObject *__pyx_float_1_0;
2550 static PyObject *__pyx_float_0_25;
2551 static PyObject *__pyx_int_0;
2552 static PyObject *__pyx_int_1;
2553 static PyObject *__pyx_int_2;
2554 static PyObject *__pyx_int_3;
2555 static PyObject *__pyx_int_4;
2556 static PyObject *__pyx_int_5;
2557 static PyObject *__pyx_int_6;
2558 static PyObject *__pyx_int_9;
2559 static PyObject *__pyx_int_10;
2560 static PyObject *__pyx_tuple_;
2561 static PyObject *__pyx_slice__2;
2562 static PyObject *__pyx_slice__5;
2563 static PyObject *__pyx_slice__7;
2564 static PyObject *__pyx_slice__8;
2565 static PyObject *__pyx_tuple__3;
2566 static PyObject *__pyx_tuple__4;
2567 static PyObject *__pyx_tuple__6;
2568 static PyObject *__pyx_tuple__9;
2569 static PyObject *__pyx_slice__10;
2570 static PyObject *__pyx_slice__11;
2571 static PyObject *__pyx_slice__13;
2572 static PyObject *__pyx_slice__14;
2573 static PyObject *__pyx_slice__16;
2574 static PyObject *__pyx_slice__18;
2575 static PyObject *__pyx_slice__20;
2576 static PyObject *__pyx_slice__22;
2577 static PyObject *__pyx_slice__24;
2578 static PyObject *__pyx_slice__26;
2579 static PyObject *__pyx_tuple__12;
2580 static PyObject *__pyx_tuple__15;
2581 static PyObject *__pyx_tuple__17;
2582 static PyObject *__pyx_tuple__19;
2583 static PyObject *__pyx_tuple__21;
2584 static PyObject *__pyx_tuple__23;
2585 static PyObject *__pyx_tuple__25;
2586 static PyObject *__pyx_tuple__27;
2587 static PyObject *__pyx_tuple__28;
2588 static PyObject *__pyx_tuple__29;
2589 static PyObject *__pyx_tuple__30;
2590 static PyObject *__pyx_tuple__31;
2591 static PyObject *__pyx_tuple__32;
2592 static PyObject *__pyx_tuple__33;
2593 static PyObject *__pyx_tuple__34;
2594 static PyObject *__pyx_tuple__35;
2595 static PyObject *__pyx_tuple__36;
2596 static PyObject *__pyx_tuple__37;
2597 static PyObject *__pyx_tuple__38;
2598 static PyObject *__pyx_tuple__39;
2599 static PyObject *__pyx_tuple__40;
2600 static PyObject *__pyx_tuple__41;
2601 static PyObject *__pyx_tuple__42;
2602 static PyObject *__pyx_tuple__43;
2603 static PyObject *__pyx_tuple__44;
2604 static PyObject *__pyx_tuple__45;
2605 static PyObject *__pyx_tuple__46;
2606 static PyObject *__pyx_tuple__47;
2607 static PyObject *__pyx_tuple__48;
2608 static PyObject *__pyx_tuple__49;
2609 static PyObject *__pyx_tuple__50;
2610 static PyObject *__pyx_tuple__51;
2611 static PyObject *__pyx_tuple__52;
2612 static PyObject *__pyx_tuple__53;
2613 static PyObject *__pyx_tuple__54;
2614 static PyObject *__pyx_tuple__55;
2615 static PyObject *__pyx_tuple__56;
2616 static PyObject *__pyx_tuple__57;
2617 static PyObject *__pyx_tuple__58;
2618 static PyObject *__pyx_tuple__59;
2619 static PyObject *__pyx_tuple__60;
2620 static PyObject *__pyx_tuple__61;
2621 static PyObject *__pyx_tuple__62;
2622 static PyObject *__pyx_tuple__63;
2623 static PyObject *__pyx_tuple__64;
2624 static PyObject *__pyx_tuple__65;
2625 static PyObject *__pyx_tuple__66;
2626 static PyObject *__pyx_tuple__67;
2627 static PyObject *__pyx_tuple__68;
2628 static PyObject *__pyx_tuple__69;
2629 static PyObject *__pyx_tuple__70;
2630 static PyObject *__pyx_tuple__71;
2631 static PyObject *__pyx_tuple__72;
2632 static PyObject *__pyx_tuple__73;
2633 static PyObject *__pyx_tuple__74;
2634 static PyObject *__pyx_tuple__75;
2635 static PyObject *__pyx_tuple__76;
2636 static PyObject *__pyx_tuple__77;
2637 static PyObject *__pyx_tuple__78;
2638 static PyObject *__pyx_tuple__79;
2639 static PyObject *__pyx_tuple__80;
2640 static PyObject *__pyx_tuple__81;
2641 static PyObject *__pyx_tuple__82;
2642 static PyObject *__pyx_tuple__83;
2643 static PyObject *__pyx_tuple__84;
2644 static PyObject *__pyx_tuple__85;
2645 static PyObject *__pyx_tuple__86;
2646 static PyObject *__pyx_tuple__87;
2647 static PyObject *__pyx_tuple__88;
2648 static PyObject *__pyx_tuple__89;
2649 static PyObject *__pyx_tuple__90;
2650 static PyObject *__pyx_tuple__91;
2651 static PyObject *__pyx_tuple__92;
2652 static PyObject *__pyx_tuple__93;
2653 static PyObject *__pyx_tuple__94;
2654 static PyObject *__pyx_tuple__95;
2655 static PyObject *__pyx_tuple__96;
2656 static PyObject *__pyx_tuple__97;
2657 static PyObject *__pyx_tuple__98;
2658 static PyObject *__pyx_tuple__99;
2659 static PyObject *__pyx_tuple__100;
2660 static PyObject *__pyx_tuple__101;
2661 static PyObject *__pyx_tuple__102;
2662 static PyObject *__pyx_tuple__104;
2663 static PyObject *__pyx_tuple__106;
2664 static PyObject *__pyx_tuple__108;
2665 static PyObject *__pyx_tuple__109;
2666 static PyObject *__pyx_tuple__111;
2667 static PyObject *__pyx_tuple__113;
2668 static PyObject *__pyx_tuple__114;
2669 static PyObject *__pyx_tuple__116;
2670 static PyObject *__pyx_tuple__118;
2671 static PyObject *__pyx_tuple__120;
2672 static PyObject *__pyx_tuple__122;
2673 static PyObject *__pyx_tuple__124;
2674 static PyObject *__pyx_tuple__126;
2675 static PyObject *__pyx_tuple__127;
2676 static PyObject *__pyx_tuple__129;
2677 static PyObject *__pyx_tuple__131;
2678 static PyObject *__pyx_tuple__133;
2679 static PyObject *__pyx_tuple__135;
2680 static PyObject *__pyx_tuple__137;
2681 static PyObject *__pyx_tuple__138;
2682 static PyObject *__pyx_tuple__140;
2683 static PyObject *__pyx_tuple__142;
2684 static PyObject *__pyx_tuple__144;
2685 static PyObject *__pyx_tuple__146;
2686 static PyObject *__pyx_tuple__148;
2687 static PyObject *__pyx_tuple__150;
2688 static PyObject *__pyx_tuple__152;
2689 static PyObject *__pyx_tuple__154;
2690 static PyObject *__pyx_codeobj__103;
2691 static PyObject *__pyx_codeobj__105;
2692 static PyObject *__pyx_codeobj__107;
2693 static PyObject *__pyx_codeobj__110;
2694 static PyObject *__pyx_codeobj__112;
2695 static PyObject *__pyx_codeobj__115;
2696 static PyObject *__pyx_codeobj__117;
2697 static PyObject *__pyx_codeobj__119;
2698 static PyObject *__pyx_codeobj__121;
2699 static PyObject *__pyx_codeobj__123;
2700 static PyObject *__pyx_codeobj__125;
2701 static PyObject *__pyx_codeobj__128;
2702 static PyObject *__pyx_codeobj__130;
2703 static PyObject *__pyx_codeobj__132;
2704 static PyObject *__pyx_codeobj__134;
2705 static PyObject *__pyx_codeobj__136;
2706 static PyObject *__pyx_codeobj__139;
2707 static PyObject *__pyx_codeobj__141;
2708 static PyObject *__pyx_codeobj__143;
2709 static PyObject *__pyx_codeobj__145;
2710 static PyObject *__pyx_codeobj__147;
2711 static PyObject *__pyx_codeobj__149;
2712 static PyObject *__pyx_codeobj__151;
2713 static PyObject *__pyx_codeobj__153;
2714 static PyObject *__pyx_codeobj__155;
2715 
2716 /* "ADR.pyx":146
2717  *
2718  * cdef cppADR_base* thisptr
2719  * def __cinit__(self, # <<<<<<<<<<<<<<
2720  * int nSpaceIn,
2721  * int nQuadraturePoints_elementIn,
2722  */
2723 
2724 /* Python wrapper */
2725 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2726 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2727  int __pyx_v_nSpaceIn;
2728  int __pyx_v_nQuadraturePoints_elementIn;
2729  int __pyx_v_nDOF_mesh_trial_elementIn;
2730  int __pyx_v_nDOF_trial_elementIn;
2731  int __pyx_v_nDOF_test_elementIn;
2732  int __pyx_v_nQuadraturePoints_elementBoundaryIn;
2733  int __pyx_v_CompKernelFlag;
2734  int __pyx_r;
2735  __Pyx_RefNannyDeclarations
2736  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2737  {
2738  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpaceIn,&__pyx_n_s_nQuadraturePoints_elementIn,&__pyx_n_s_nDOF_mesh_trial_elementIn,&__pyx_n_s_nDOF_trial_elementIn,&__pyx_n_s_nDOF_test_elementIn,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_CompKernelFlag,0};
2739  PyObject* values[7] = {0,0,0,0,0,0,0};
2740  if (unlikely(__pyx_kwds)) {
2741  Py_ssize_t kw_args;
2742  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2743  switch (pos_args) {
2744  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2745  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2746  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2747  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2748  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2749  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2750  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2751  case 0: break;
2752  default: goto __pyx_L5_argtuple_error;
2753  }
2754  kw_args = PyDict_Size(__pyx_kwds);
2755  switch (pos_args) {
2756  case 0:
2757  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nSpaceIn)) != 0)) kw_args--;
2758  else goto __pyx_L5_argtuple_error;
2759  case 1:
2760  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementIn)) != 0)) kw_args--;
2761  else {
2762  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); __PYX_ERR(0, 146, __pyx_L3_error)
2763  }
2764  case 2:
2765  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_mesh_trial_elementIn)) != 0)) kw_args--;
2766  else {
2767  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); __PYX_ERR(0, 146, __pyx_L3_error)
2768  }
2769  case 3:
2770  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_trial_elementIn)) != 0)) kw_args--;
2771  else {
2772  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); __PYX_ERR(0, 146, __pyx_L3_error)
2773  }
2774  case 4:
2775  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nDOF_test_elementIn)) != 0)) kw_args--;
2776  else {
2777  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); __PYX_ERR(0, 146, __pyx_L3_error)
2778  }
2779  case 5:
2780  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
2781  else {
2782  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); __PYX_ERR(0, 146, __pyx_L3_error)
2783  }
2784  case 6:
2785  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CompKernelFlag)) != 0)) kw_args--;
2786  else {
2787  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); __PYX_ERR(0, 146, __pyx_L3_error)
2788  }
2789  }
2790  if (unlikely(kw_args > 0)) {
2791  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
2792  }
2793  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
2794  goto __pyx_L5_argtuple_error;
2795  } else {
2796  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2797  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2798  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2799  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2800  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2801  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2802  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2803  }
2804  __pyx_v_nSpaceIn = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpaceIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
2805  __pyx_v_nQuadraturePoints_elementIn = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error)
2806  __pyx_v_nDOF_mesh_trial_elementIn = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nDOF_mesh_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L3_error)
2807  __pyx_v_nDOF_trial_elementIn = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nDOF_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L3_error)
2808  __pyx_v_nDOF_test_elementIn = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nDOF_test_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L3_error)
2809  __pyx_v_nQuadraturePoints_elementBoundaryIn = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundaryIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error)
2810  __pyx_v_CompKernelFlag = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_CompKernelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L3_error)
2811  }
2812  goto __pyx_L4_argument_unpacking_done;
2813  __pyx_L5_argtuple_error:;
2814  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
2815  __pyx_L3_error:;
2816  __Pyx_AddTraceback("ADR.ADR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2817  __Pyx_RefNannyFinishContext();
2818  return -1;
2819  __pyx_L4_argument_unpacking_done:;
2820  __pyx_r = __pyx_pf_3ADR_3ADR___cinit__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
2821 
2822  /* function exit code */
2823  __Pyx_RefNannyFinishContext();
2824  return __pyx_r;
2825 }
2826 
2827 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag) {
2828  int __pyx_r;
2829  __Pyx_RefNannyDeclarations
2830  __Pyx_RefNannySetupContext("__cinit__", 0);
2831 
2832  /* "ADR.pyx":154
2833  * int nQuadraturePoints_elementBoundaryIn,
2834  * int CompKernelFlag):
2835  * self.thisptr = newADR(nSpaceIn, # <<<<<<<<<<<<<<
2836  * nQuadraturePoints_elementIn,
2837  * nDOF_mesh_trial_elementIn,
2838  */
2839  __pyx_v_self->thisptr = proteus::newADR(__pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
2840 
2841  /* "ADR.pyx":146
2842  *
2843  * cdef cppADR_base* thisptr
2844  * def __cinit__(self, # <<<<<<<<<<<<<<
2845  * int nSpaceIn,
2846  * int nQuadraturePoints_elementIn,
2847  */
2848 
2849  /* function exit code */
2850  __pyx_r = 0;
2851  __Pyx_RefNannyFinishContext();
2852  return __pyx_r;
2853 }
2854 
2855 /* "ADR.pyx":161
2856  * nQuadraturePoints_elementBoundaryIn,
2857  * CompKernelFlag)
2858  * def __dealloc__(self): # <<<<<<<<<<<<<<
2859  * del self.thisptr
2860  * def calculateResidual(self,
2861  */
2862 
2863 /* Python wrapper */
2864 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
2865 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self) {
2866  __Pyx_RefNannyDeclarations
2867  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
2868  __pyx_pf_3ADR_3ADR_2__dealloc__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self));
2869 
2870  /* function exit code */
2871  __Pyx_RefNannyFinishContext();
2872 }
2873 
2874 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self) {
2875  __Pyx_RefNannyDeclarations
2876  __Pyx_RefNannySetupContext("__dealloc__", 0);
2877 
2878  /* "ADR.pyx":162
2879  * CompKernelFlag)
2880  * def __dealloc__(self):
2881  * del self.thisptr # <<<<<<<<<<<<<<
2882  * def calculateResidual(self,
2883  * numpy.ndarray mesh_trial_ref,
2884  */
2885  delete __pyx_v_self->thisptr;
2886 
2887  /* "ADR.pyx":161
2888  * nQuadraturePoints_elementBoundaryIn,
2889  * CompKernelFlag)
2890  * def __dealloc__(self): # <<<<<<<<<<<<<<
2891  * del self.thisptr
2892  * def calculateResidual(self,
2893  */
2894 
2895  /* function exit code */
2896  __Pyx_RefNannyFinishContext();
2897 }
2898 
2899 /* "ADR.pyx":163
2900  * def __dealloc__(self):
2901  * del self.thisptr
2902  * def calculateResidual(self, # <<<<<<<<<<<<<<
2903  * numpy.ndarray mesh_trial_ref,
2904  * numpy.ndarray mesh_grad_trial_ref,
2905  */
2906 
2907 /* Python wrapper */
2908 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2909 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2910  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
2911  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
2912  PyArrayObject *__pyx_v_mesh_dof = 0;
2913  PyArrayObject *__pyx_v_mesh_l2g = 0;
2914  PyArrayObject *__pyx_v_dV_ref = 0;
2915  PyArrayObject *__pyx_v_u_trial_ref = 0;
2916  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
2917  PyArrayObject *__pyx_v_u_test_ref = 0;
2918  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
2919  PyArrayObject *__pyx_v_elementDiameter = 0;
2920  PyArrayObject *__pyx_v_cfl = 0;
2921  double __pyx_v_CT_sge;
2922  double __pyx_v_sc_uref;
2923  double __pyx_v_sc_alpha;
2924  double __pyx_v_useMetrics;
2925  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
2926  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
2927  PyArrayObject *__pyx_v_dS_ref = 0;
2928  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
2929  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
2930  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
2931  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
2932  PyArrayObject *__pyx_v_normal_ref = 0;
2933  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
2934  int __pyx_v_nElements_global;
2935  PyArrayObject *__pyx_v_u_l2g = 0;
2936  PyArrayObject *__pyx_v_u_dof = 0;
2937  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
2938  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
2939  PyArrayObject *__pyx_v_q_a = 0;
2940  PyArrayObject *__pyx_v_q_v = 0;
2941  PyArrayObject *__pyx_v_q_r = 0;
2942  int __pyx_v_lag_shockCapturing;
2943  double __pyx_v_shockCapturingDiffusion;
2944  PyArrayObject *__pyx_v_q_numDiff_u = 0;
2945  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
2946  int __pyx_v_offset_u;
2947  int __pyx_v_stride_u;
2948  PyArrayObject *__pyx_v_globalResidual = 0;
2949  int __pyx_v_nExteriorElementBoundaries_global;
2950  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
2951  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
2952  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
2953  PyArrayObject *__pyx_v_ebqe_a = 0;
2954  PyArrayObject *__pyx_v_ebqe_v = 0;
2955  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
2956  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
2957  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
2958  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
2959  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
2960  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
2961  PyArrayObject *__pyx_v_ebqe_penalty = 0;
2962  double __pyx_v_adjoint_sigma;
2963  PyObject *__pyx_r = 0;
2964  __Pyx_RefNannyDeclarations
2965  __Pyx_RefNannySetupContext("calculateResidual (wrapper)", 0);
2966  {
2967  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_globalResidual,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
2968  PyObject* values[53] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
2969  if (unlikely(__pyx_kwds)) {
2970  Py_ssize_t kw_args;
2971  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2972  switch (pos_args) {
2973  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
2974  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
2975  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
2976  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
2977  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
2978  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
2979  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
2980  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
2981  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
2982  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
2983  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
2984  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
2985  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
2986  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
2987  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
2988  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
2989  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
2990  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
2991  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
2992  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
2993  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
2994  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
2995  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
2996  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
2997  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
2998  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
2999  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3000  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3001  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3002  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3003  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3004  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3005  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3006  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3007  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3008  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3009  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3010  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3011  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3012  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3013  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3014  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3015  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3016  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3017  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3018  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3019  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3020  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3021  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3022  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3023  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3024  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3025  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3026  case 0: break;
3027  default: goto __pyx_L5_argtuple_error;
3028  }
3029  kw_args = PyDict_Size(__pyx_kwds);
3030  switch (pos_args) {
3031  case 0:
3032  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
3033  else goto __pyx_L5_argtuple_error;
3034  case 1:
3035  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
3036  else {
3037  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 1); __PYX_ERR(0, 163, __pyx_L3_error)
3038  }
3039  case 2:
3040  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
3041  else {
3042  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 2); __PYX_ERR(0, 163, __pyx_L3_error)
3043  }
3044  case 3:
3045  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
3046  else {
3047  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 3); __PYX_ERR(0, 163, __pyx_L3_error)
3048  }
3049  case 4:
3050  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
3051  else {
3052  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 4); __PYX_ERR(0, 163, __pyx_L3_error)
3053  }
3054  case 5:
3055  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
3056  else {
3057  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 5); __PYX_ERR(0, 163, __pyx_L3_error)
3058  }
3059  case 6:
3060  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
3061  else {
3062  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 6); __PYX_ERR(0, 163, __pyx_L3_error)
3063  }
3064  case 7:
3065  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
3066  else {
3067  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 7); __PYX_ERR(0, 163, __pyx_L3_error)
3068  }
3069  case 8:
3070  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
3071  else {
3072  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 8); __PYX_ERR(0, 163, __pyx_L3_error)
3073  }
3074  case 9:
3075  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3076  else {
3077  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 9); __PYX_ERR(0, 163, __pyx_L3_error)
3078  }
3079  case 10:
3080  if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3081  else {
3082  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 10); __PYX_ERR(0, 163, __pyx_L3_error)
3083  }
3084  case 11:
3085  if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
3086  else {
3087  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 11); __PYX_ERR(0, 163, __pyx_L3_error)
3088  }
3089  case 12:
3090  if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
3091  else {
3092  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 12); __PYX_ERR(0, 163, __pyx_L3_error)
3093  }
3094  case 13:
3095  if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
3096  else {
3097  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 13); __PYX_ERR(0, 163, __pyx_L3_error)
3098  }
3099  case 14:
3100  if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
3101  else {
3102  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 14); __PYX_ERR(0, 163, __pyx_L3_error)
3103  }
3104  case 15:
3105  if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
3106  else {
3107  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 15); __PYX_ERR(0, 163, __pyx_L3_error)
3108  }
3109  case 16:
3110  if (likely((values[16] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
3111  else {
3112  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 16); __PYX_ERR(0, 163, __pyx_L3_error)
3113  }
3114  case 17:
3115  if (likely((values[17] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
3116  else {
3117  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 17); __PYX_ERR(0, 163, __pyx_L3_error)
3118  }
3119  case 18:
3120  if (likely((values[18] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
3121  else {
3122  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 18); __PYX_ERR(0, 163, __pyx_L3_error)
3123  }
3124  case 19:
3125  if (likely((values[19] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
3126  else {
3127  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 19); __PYX_ERR(0, 163, __pyx_L3_error)
3128  }
3129  case 20:
3130  if (likely((values[20] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
3131  else {
3132  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 20); __PYX_ERR(0, 163, __pyx_L3_error)
3133  }
3134  case 21:
3135  if (likely((values[21] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
3136  else {
3137  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 21); __PYX_ERR(0, 163, __pyx_L3_error)
3138  }
3139  case 22:
3140  if (likely((values[22] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
3141  else {
3142  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 22); __PYX_ERR(0, 163, __pyx_L3_error)
3143  }
3144  case 23:
3145  if (likely((values[23] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
3146  else {
3147  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 23); __PYX_ERR(0, 163, __pyx_L3_error)
3148  }
3149  case 24:
3150  if (likely((values[24] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3151  else {
3152  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 24); __PYX_ERR(0, 163, __pyx_L3_error)
3153  }
3154  case 25:
3155  if (likely((values[25] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
3156  else {
3157  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 25); __PYX_ERR(0, 163, __pyx_L3_error)
3158  }
3159  case 26:
3160  if (likely((values[26] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
3161  else {
3162  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 26); __PYX_ERR(0, 163, __pyx_L3_error)
3163  }
3164  case 27:
3165  if (likely((values[27] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
3166  else {
3167  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 27); __PYX_ERR(0, 163, __pyx_L3_error)
3168  }
3169  case 28:
3170  if (likely((values[28] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
3171  else {
3172  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 28); __PYX_ERR(0, 163, __pyx_L3_error)
3173  }
3174  case 29:
3175  if (likely((values[29] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
3176  else {
3177  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 29); __PYX_ERR(0, 163, __pyx_L3_error)
3178  }
3179  case 30:
3180  if (likely((values[30] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
3181  else {
3182  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 30); __PYX_ERR(0, 163, __pyx_L3_error)
3183  }
3184  case 31:
3185  if (likely((values[31] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
3186  else {
3187  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 31); __PYX_ERR(0, 163, __pyx_L3_error)
3188  }
3189  case 32:
3190  if (likely((values[32] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
3191  else {
3192  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 32); __PYX_ERR(0, 163, __pyx_L3_error)
3193  }
3194  case 33:
3195  if (likely((values[33] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
3196  else {
3197  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 33); __PYX_ERR(0, 163, __pyx_L3_error)
3198  }
3199  case 34:
3200  if (likely((values[34] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
3201  else {
3202  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 34); __PYX_ERR(0, 163, __pyx_L3_error)
3203  }
3204  case 35:
3205  if (likely((values[35] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
3206  else {
3207  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 35); __PYX_ERR(0, 163, __pyx_L3_error)
3208  }
3209  case 36:
3210  if (likely((values[36] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
3211  else {
3212  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 36); __PYX_ERR(0, 163, __pyx_L3_error)
3213  }
3214  case 37:
3215  if (likely((values[37] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
3216  else {
3217  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 37); __PYX_ERR(0, 163, __pyx_L3_error)
3218  }
3219  case 38:
3220  if (likely((values[38] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalResidual)) != 0)) kw_args--;
3221  else {
3222  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 38); __PYX_ERR(0, 163, __pyx_L3_error)
3223  }
3224  case 39:
3225  if (likely((values[39] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3226  else {
3227  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 39); __PYX_ERR(0, 163, __pyx_L3_error)
3228  }
3229  case 40:
3230  if (likely((values[40] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3231  else {
3232  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 40); __PYX_ERR(0, 163, __pyx_L3_error)
3233  }
3234  case 41:
3235  if (likely((values[41] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3236  else {
3237  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 41); __PYX_ERR(0, 163, __pyx_L3_error)
3238  }
3239  case 42:
3240  if (likely((values[42] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3241  else {
3242  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 42); __PYX_ERR(0, 163, __pyx_L3_error)
3243  }
3244  case 43:
3245  if (likely((values[43] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
3246  else {
3247  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 43); __PYX_ERR(0, 163, __pyx_L3_error)
3248  }
3249  case 44:
3250  if (likely((values[44] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
3251  else {
3252  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 44); __PYX_ERR(0, 163, __pyx_L3_error)
3253  }
3254  case 45:
3255  if (likely((values[45] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
3256  else {
3257  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 45); __PYX_ERR(0, 163, __pyx_L3_error)
3258  }
3259  case 46:
3260  if (likely((values[46] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
3261  else {
3262  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 46); __PYX_ERR(0, 163, __pyx_L3_error)
3263  }
3264  case 47:
3265  if (likely((values[47] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
3266  else {
3267  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 47); __PYX_ERR(0, 163, __pyx_L3_error)
3268  }
3269  case 48:
3270  if (likely((values[48] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
3271  else {
3272  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 48); __PYX_ERR(0, 163, __pyx_L3_error)
3273  }
3274  case 49:
3275  if (likely((values[49] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
3276  else {
3277  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 49); __PYX_ERR(0, 163, __pyx_L3_error)
3278  }
3279  case 50:
3280  if (likely((values[50] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
3281  else {
3282  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 50); __PYX_ERR(0, 163, __pyx_L3_error)
3283  }
3284  case 51:
3285  if (likely((values[51] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
3286  else {
3287  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 51); __PYX_ERR(0, 163, __pyx_L3_error)
3288  }
3289  case 52:
3290  if (likely((values[52] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
3291  else {
3292  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 52); __PYX_ERR(0, 163, __pyx_L3_error)
3293  }
3294  }
3295  if (unlikely(kw_args > 0)) {
3296  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateResidual") < 0)) __PYX_ERR(0, 163, __pyx_L3_error)
3297  }
3298  } else if (PyTuple_GET_SIZE(__pyx_args) != 53) {
3299  goto __pyx_L5_argtuple_error;
3300  } else {
3301  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3302  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3303  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3304  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3305  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3306  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3307  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3308  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3309  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3310  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3311  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3312  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3313  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3314  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3315  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3316  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3317  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3318  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3319  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3320  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3321  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3322  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3323  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3324  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3325  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3326  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3327  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3328  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3329  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3330  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3331  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3332  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3333  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3334  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3335  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3336  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3337  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3338  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3339  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3340  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3341  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3342  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3343  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3344  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3345  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3346  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3347  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3348  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3349  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3350  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3351  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3352  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3353  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3354  }
3355  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
3356  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
3357  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
3358  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
3359  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
3360  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
3361  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
3362  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
3363  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
3364  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
3365  __pyx_v_cfl = ((PyArrayObject *)values[10]);
3366  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L3_error)
3367  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L3_error)
3368  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error)
3369  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error)
3370  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
3371  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
3372  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
3373  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
3374  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
3375  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
3376  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
3377  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
3378  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
3379  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error)
3380  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
3381  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
3382  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
3383  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
3384  __pyx_v_q_a = ((PyArrayObject *)values[29]);
3385  __pyx_v_q_v = ((PyArrayObject *)values[30]);
3386  __pyx_v_q_r = ((PyArrayObject *)values[31]);
3387  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error)
3388  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error)
3389  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
3390  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
3391  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[36]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L3_error)
3392  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[37]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
3393  __pyx_v_globalResidual = ((PyArrayObject *)values[38]);
3394  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 203, __pyx_L3_error)
3395  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
3396  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
3397  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
3398  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
3399  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
3400  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
3401  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
3402  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
3403  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
3404  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
3405  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
3406  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[51]);
3407  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[52]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error)
3408  }
3409  goto __pyx_L4_argument_unpacking_done;
3410  __pyx_L5_argtuple_error:;
3411  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error)
3412  __pyx_L3_error:;
3413  __Pyx_AddTraceback("ADR.ADR.calculateResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
3414  __Pyx_RefNannyFinishContext();
3415  return NULL;
3416  __pyx_L4_argument_unpacking_done:;
3417  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(0, 164, __pyx_L1_error)
3418  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(0, 165, __pyx_L1_error)
3419  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(0, 166, __pyx_L1_error)
3420  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(0, 167, __pyx_L1_error)
3421  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(0, 168, __pyx_L1_error)
3422  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(0, 169, __pyx_L1_error)
3423  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(0, 170, __pyx_L1_error)
3424  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(0, 171, __pyx_L1_error)
3425  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(0, 172, __pyx_L1_error)
3426  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 173, __pyx_L1_error)
3427  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 174, __pyx_L1_error)
3428  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(0, 179, __pyx_L1_error)
3429  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(0, 180, __pyx_L1_error)
3430  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(0, 181, __pyx_L1_error)
3431  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(0, 182, __pyx_L1_error)
3432  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(0, 183, __pyx_L1_error)
3433  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(0, 184, __pyx_L1_error)
3434  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(0, 185, __pyx_L1_error)
3435  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(0, 186, __pyx_L1_error)
3436  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(0, 187, __pyx_L1_error)
3437  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(0, 189, __pyx_L1_error)
3438  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(0, 190, __pyx_L1_error)
3439  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(0, 191, __pyx_L1_error)
3440  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(0, 192, __pyx_L1_error)
3441  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(0, 193, __pyx_L1_error)
3442  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(0, 194, __pyx_L1_error)
3443  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(0, 195, __pyx_L1_error)
3444  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(0, 198, __pyx_L1_error)
3445  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(0, 199, __pyx_L1_error)
3446  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalResidual), __pyx_ptype_5numpy_ndarray, 1, "globalResidual", 0))) __PYX_ERR(0, 202, __pyx_L1_error)
3447  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 204, __pyx_L1_error)
3448  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 205, __pyx_L1_error)
3449  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 206, __pyx_L1_error)
3450  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(0, 207, __pyx_L1_error)
3451  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(0, 208, __pyx_L1_error)
3452  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(0, 209, __pyx_L1_error)
3453  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(0, 210, __pyx_L1_error)
3454  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(0, 211, __pyx_L1_error)
3455  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(0, 212, __pyx_L1_error)
3456  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(0, 213, __pyx_L1_error)
3457  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(0, 214, __pyx_L1_error)
3458  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(0, 215, __pyx_L1_error)
3459  __pyx_r = __pyx_pf_3ADR_3ADR_4calculateResidual(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_globalResidual, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
3460 
3461  /* function exit code */
3462  goto __pyx_L0;
3463  __pyx_L1_error:;
3464  __pyx_r = NULL;
3465  __pyx_L0:;
3466  __Pyx_RefNannyFinishContext();
3467  return __pyx_r;
3468 }
3469 
3470 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
3471  PyObject *__pyx_r = NULL;
3472  __Pyx_RefNannyDeclarations
3473  __Pyx_RefNannySetupContext("calculateResidual", 0);
3474 
3475  /* "ADR.pyx":217
3476  * numpy.ndarray ebqe_penalty,
3477  * double adjoint_sigma):
3478  * self.thisptr.calculateResidual(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
3479  * <double*> mesh_grad_trial_ref.data,
3480  * <double*> mesh_dof.data,
3481  */
3482  __pyx_v_self->thisptr->calculateResidual(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), __pyx_v_offset_u, __pyx_v_stride_u, ((double *)__pyx_v_globalResidual->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
3483 
3484  /* "ADR.pyx":163
3485  * def __dealloc__(self):
3486  * del self.thisptr
3487  * def calculateResidual(self, # <<<<<<<<<<<<<<
3488  * numpy.ndarray mesh_trial_ref,
3489  * numpy.ndarray mesh_grad_trial_ref,
3490  */
3491 
3492  /* function exit code */
3493  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3494  __Pyx_XGIVEREF(__pyx_r);
3495  __Pyx_RefNannyFinishContext();
3496  return __pyx_r;
3497 }
3498 
3499 /* "ADR.pyx":270
3500  * <double*> ebqe_penalty.data,
3501  * adjoint_sigma)
3502  * def calculateJacobian(self, # <<<<<<<<<<<<<<
3503  * numpy.ndarray mesh_trial_ref,
3504  * numpy.ndarray mesh_grad_trial_ref,
3505  */
3506 
3507 /* Python wrapper */
3508 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3509 static char __pyx_doc_3ADR_3ADR_6calculateJacobian[] = "\n Optimized jacobian calculation\n ";
3510 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3511  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
3512  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
3513  PyArrayObject *__pyx_v_mesh_dof = 0;
3514  PyArrayObject *__pyx_v_mesh_l2g = 0;
3515  PyArrayObject *__pyx_v_dV_ref = 0;
3516  PyArrayObject *__pyx_v_u_trial_ref = 0;
3517  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
3518  PyArrayObject *__pyx_v_u_test_ref = 0;
3519  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
3520  PyArrayObject *__pyx_v_elementDiameter = 0;
3521  PyArrayObject *__pyx_v_cfl = 0;
3522  double __pyx_v_CT_sge;
3523  double __pyx_v_sc_uref;
3524  double __pyx_v_sc_alpha;
3525  double __pyx_v_useMetrics;
3526  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
3527  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
3528  PyArrayObject *__pyx_v_dS_ref = 0;
3529  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
3530  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
3531  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
3532  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
3533  PyArrayObject *__pyx_v_normal_ref = 0;
3534  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
3535  int __pyx_v_nElements_global;
3536  PyArrayObject *__pyx_v_u_l2g = 0;
3537  PyArrayObject *__pyx_v_u_dof = 0;
3538  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
3539  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
3540  PyArrayObject *__pyx_v_q_a = 0;
3541  PyArrayObject *__pyx_v_q_v = 0;
3542  PyArrayObject *__pyx_v_q_r = 0;
3543  int __pyx_v_lag_shockCapturing;
3544  double __pyx_v_shockCapturingDiffusion;
3545  PyArrayObject *__pyx_v_q_numDiff_u = 0;
3546  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
3547  PyArrayObject *__pyx_v_csrRowIndeces_u_u = 0;
3548  PyArrayObject *__pyx_v_csrColumnOffsets_u_u = 0;
3549  PyObject *__pyx_v_globalJacobian = 0;
3550  int __pyx_v_nExteriorElementBoundaries_global;
3551  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
3552  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
3553  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
3554  PyArrayObject *__pyx_v_ebqe_a = 0;
3555  PyArrayObject *__pyx_v_ebqe_v = 0;
3556  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
3557  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
3558  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
3559  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
3560  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
3561  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
3562  PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u = 0;
3563  PyArrayObject *__pyx_v_ebqe_penalty = 0;
3564  double __pyx_v_adjoint_sigma;
3565  PyObject *__pyx_r = 0;
3566  __Pyx_RefNannyDeclarations
3567  __Pyx_RefNannySetupContext("calculateJacobian (wrapper)", 0);
3568  {
3569  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_csrRowIndeces_u_u,&__pyx_n_s_csrColumnOffsets_u_u,&__pyx_n_s_globalJacobian,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_csrColumnOffsets_eb_u_u,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
3570  PyObject* values[54] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3571  if (unlikely(__pyx_kwds)) {
3572  Py_ssize_t kw_args;
3573  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3574  switch (pos_args) {
3575  case 54: values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
3576  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3577  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3578  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3579  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3580  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3581  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3582  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3583  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3584  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3585  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3586  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3587  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3588  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3589  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3590  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3591  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3592  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3593  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3594  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3595  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3596  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3597  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3598  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3599  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3600  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3601  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3602  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3603  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3604  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3605  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3606  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3607  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3608  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3609  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3610  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3611  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3612  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3613  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3614  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3615  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3616  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3617  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3618  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3619  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3620  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3621  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3622  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3623  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3624  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3625  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3626  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3627  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3628  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3629  case 0: break;
3630  default: goto __pyx_L5_argtuple_error;
3631  }
3632  kw_args = PyDict_Size(__pyx_kwds);
3633  switch (pos_args) {
3634  case 0:
3635  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
3636  else goto __pyx_L5_argtuple_error;
3637  case 1:
3638  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
3639  else {
3640  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 1); __PYX_ERR(0, 270, __pyx_L3_error)
3641  }
3642  case 2:
3643  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
3644  else {
3645  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 2); __PYX_ERR(0, 270, __pyx_L3_error)
3646  }
3647  case 3:
3648  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
3649  else {
3650  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 3); __PYX_ERR(0, 270, __pyx_L3_error)
3651  }
3652  case 4:
3653  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
3654  else {
3655  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 4); __PYX_ERR(0, 270, __pyx_L3_error)
3656  }
3657  case 5:
3658  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
3659  else {
3660  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 5); __PYX_ERR(0, 270, __pyx_L3_error)
3661  }
3662  case 6:
3663  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
3664  else {
3665  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 6); __PYX_ERR(0, 270, __pyx_L3_error)
3666  }
3667  case 7:
3668  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
3669  else {
3670  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 7); __PYX_ERR(0, 270, __pyx_L3_error)
3671  }
3672  case 8:
3673  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
3674  else {
3675  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 8); __PYX_ERR(0, 270, __pyx_L3_error)
3676  }
3677  case 9:
3678  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3679  else {
3680  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 9); __PYX_ERR(0, 270, __pyx_L3_error)
3681  }
3682  case 10:
3683  if (likely((values[10] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3684  else {
3685  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 10); __PYX_ERR(0, 270, __pyx_L3_error)
3686  }
3687  case 11:
3688  if (likely((values[11] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
3689  else {
3690  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 11); __PYX_ERR(0, 270, __pyx_L3_error)
3691  }
3692  case 12:
3693  if (likely((values[12] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
3694  else {
3695  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 12); __PYX_ERR(0, 270, __pyx_L3_error)
3696  }
3697  case 13:
3698  if (likely((values[13] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
3699  else {
3700  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 13); __PYX_ERR(0, 270, __pyx_L3_error)
3701  }
3702  case 14:
3703  if (likely((values[14] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
3704  else {
3705  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 14); __PYX_ERR(0, 270, __pyx_L3_error)
3706  }
3707  case 15:
3708  if (likely((values[15] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
3709  else {
3710  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 15); __PYX_ERR(0, 270, __pyx_L3_error)
3711  }
3712  case 16:
3713  if (likely((values[16] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
3714  else {
3715  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 16); __PYX_ERR(0, 270, __pyx_L3_error)
3716  }
3717  case 17:
3718  if (likely((values[17] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
3719  else {
3720  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 17); __PYX_ERR(0, 270, __pyx_L3_error)
3721  }
3722  case 18:
3723  if (likely((values[18] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
3724  else {
3725  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 18); __PYX_ERR(0, 270, __pyx_L3_error)
3726  }
3727  case 19:
3728  if (likely((values[19] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
3729  else {
3730  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 19); __PYX_ERR(0, 270, __pyx_L3_error)
3731  }
3732  case 20:
3733  if (likely((values[20] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
3734  else {
3735  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 20); __PYX_ERR(0, 270, __pyx_L3_error)
3736  }
3737  case 21:
3738  if (likely((values[21] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
3739  else {
3740  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 21); __PYX_ERR(0, 270, __pyx_L3_error)
3741  }
3742  case 22:
3743  if (likely((values[22] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
3744  else {
3745  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 22); __PYX_ERR(0, 270, __pyx_L3_error)
3746  }
3747  case 23:
3748  if (likely((values[23] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
3749  else {
3750  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 23); __PYX_ERR(0, 270, __pyx_L3_error)
3751  }
3752  case 24:
3753  if (likely((values[24] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3754  else {
3755  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 24); __PYX_ERR(0, 270, __pyx_L3_error)
3756  }
3757  case 25:
3758  if (likely((values[25] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
3759  else {
3760  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 25); __PYX_ERR(0, 270, __pyx_L3_error)
3761  }
3762  case 26:
3763  if (likely((values[26] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
3764  else {
3765  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 26); __PYX_ERR(0, 270, __pyx_L3_error)
3766  }
3767  case 27:
3768  if (likely((values[27] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
3769  else {
3770  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 27); __PYX_ERR(0, 270, __pyx_L3_error)
3771  }
3772  case 28:
3773  if (likely((values[28] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
3774  else {
3775  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 28); __PYX_ERR(0, 270, __pyx_L3_error)
3776  }
3777  case 29:
3778  if (likely((values[29] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
3779  else {
3780  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 29); __PYX_ERR(0, 270, __pyx_L3_error)
3781  }
3782  case 30:
3783  if (likely((values[30] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
3784  else {
3785  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 30); __PYX_ERR(0, 270, __pyx_L3_error)
3786  }
3787  case 31:
3788  if (likely((values[31] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
3789  else {
3790  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 31); __PYX_ERR(0, 270, __pyx_L3_error)
3791  }
3792  case 32:
3793  if (likely((values[32] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
3794  else {
3795  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 32); __PYX_ERR(0, 270, __pyx_L3_error)
3796  }
3797  case 33:
3798  if (likely((values[33] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
3799  else {
3800  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 33); __PYX_ERR(0, 270, __pyx_L3_error)
3801  }
3802  case 34:
3803  if (likely((values[34] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
3804  else {
3805  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 34); __PYX_ERR(0, 270, __pyx_L3_error)
3806  }
3807  case 35:
3808  if (likely((values[35] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
3809  else {
3810  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 35); __PYX_ERR(0, 270, __pyx_L3_error)
3811  }
3812  case 36:
3813  if (likely((values[36] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrRowIndeces_u_u)) != 0)) kw_args--;
3814  else {
3815  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 36); __PYX_ERR(0, 270, __pyx_L3_error)
3816  }
3817  case 37:
3818  if (likely((values[37] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrColumnOffsets_u_u)) != 0)) kw_args--;
3819  else {
3820  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 37); __PYX_ERR(0, 270, __pyx_L3_error)
3821  }
3822  case 38:
3823  if (likely((values[38] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
3824  else {
3825  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 38); __PYX_ERR(0, 270, __pyx_L3_error)
3826  }
3827  case 39:
3828  if (likely((values[39] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3829  else {
3830  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 39); __PYX_ERR(0, 270, __pyx_L3_error)
3831  }
3832  case 40:
3833  if (likely((values[40] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3834  else {
3835  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 40); __PYX_ERR(0, 270, __pyx_L3_error)
3836  }
3837  case 41:
3838  if (likely((values[41] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3839  else {
3840  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 41); __PYX_ERR(0, 270, __pyx_L3_error)
3841  }
3842  case 42:
3843  if (likely((values[42] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3844  else {
3845  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 42); __PYX_ERR(0, 270, __pyx_L3_error)
3846  }
3847  case 43:
3848  if (likely((values[43] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
3849  else {
3850  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 43); __PYX_ERR(0, 270, __pyx_L3_error)
3851  }
3852  case 44:
3853  if (likely((values[44] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
3854  else {
3855  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 44); __PYX_ERR(0, 270, __pyx_L3_error)
3856  }
3857  case 45:
3858  if (likely((values[45] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
3859  else {
3860  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 45); __PYX_ERR(0, 270, __pyx_L3_error)
3861  }
3862  case 46:
3863  if (likely((values[46] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
3864  else {
3865  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 46); __PYX_ERR(0, 270, __pyx_L3_error)
3866  }
3867  case 47:
3868  if (likely((values[47] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
3869  else {
3870  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 47); __PYX_ERR(0, 270, __pyx_L3_error)
3871  }
3872  case 48:
3873  if (likely((values[48] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
3874  else {
3875  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 48); __PYX_ERR(0, 270, __pyx_L3_error)
3876  }
3877  case 49:
3878  if (likely((values[49] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
3879  else {
3880  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 49); __PYX_ERR(0, 270, __pyx_L3_error)
3881  }
3882  case 50:
3883  if (likely((values[50] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
3884  else {
3885  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 50); __PYX_ERR(0, 270, __pyx_L3_error)
3886  }
3887  case 51:
3888  if (likely((values[51] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_u_u)) != 0)) kw_args--;
3889  else {
3890  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 51); __PYX_ERR(0, 270, __pyx_L3_error)
3891  }
3892  case 52:
3893  if (likely((values[52] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
3894  else {
3895  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 52); __PYX_ERR(0, 270, __pyx_L3_error)
3896  }
3897  case 53:
3898  if (likely((values[53] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
3899  else {
3900  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 53); __PYX_ERR(0, 270, __pyx_L3_error)
3901  }
3902  }
3903  if (unlikely(kw_args > 0)) {
3904  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateJacobian") < 0)) __PYX_ERR(0, 270, __pyx_L3_error)
3905  }
3906  } else if (PyTuple_GET_SIZE(__pyx_args) != 54) {
3907  goto __pyx_L5_argtuple_error;
3908  } else {
3909  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3910  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3911  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3912  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3913  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3914  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3915  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3916  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3917  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3918  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3919  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3920  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3921  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3922  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3923  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3924  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3925  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3926  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3927  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3928  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3929  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3930  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3931  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3932  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3933  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3934  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3935  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3936  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3937  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3938  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3939  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3940  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3941  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3942  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3943  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3944  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3945  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3946  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3947  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3948  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3949  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3950  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3951  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3952  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3953  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3954  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3955  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3956  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3957  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3958  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3959  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3960  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3961  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3962  values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
3963  }
3964  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
3965  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
3966  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
3967  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
3968  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
3969  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
3970  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
3971  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
3972  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
3973  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
3974  __pyx_v_cfl = ((PyArrayObject *)values[10]);
3975  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L3_error)
3976  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error)
3977  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error)
3978  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L3_error)
3979  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
3980  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
3981  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
3982  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
3983  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
3984  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
3985  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
3986  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
3987  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
3988  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L3_error)
3989  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
3990  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
3991  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
3992  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
3993  __pyx_v_q_a = ((PyArrayObject *)values[29]);
3994  __pyx_v_q_v = ((PyArrayObject *)values[30]);
3995  __pyx_v_q_r = ((PyArrayObject *)values[31]);
3996  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L3_error)
3997  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L3_error)
3998  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
3999  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
4000  __pyx_v_csrRowIndeces_u_u = ((PyArrayObject *)values[36]);
4001  __pyx_v_csrColumnOffsets_u_u = ((PyArrayObject *)values[37]);
4002  __pyx_v_globalJacobian = values[38];
4003  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L3_error)
4004  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
4005  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
4006  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
4007  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
4008  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
4009  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
4010  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
4011  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
4012  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
4013  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
4014  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
4015  __pyx_v_csrColumnOffsets_eb_u_u = ((PyArrayObject *)values[51]);
4016  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[52]);
4017  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[53]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L3_error)
4018  }
4019  goto __pyx_L4_argument_unpacking_done;
4020  __pyx_L5_argtuple_error:;
4021  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 270, __pyx_L3_error)
4022  __pyx_L3_error:;
4023  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4024  __Pyx_RefNannyFinishContext();
4025  return NULL;
4026  __pyx_L4_argument_unpacking_done:;
4027  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(0, 271, __pyx_L1_error)
4028  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(0, 272, __pyx_L1_error)
4029  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(0, 273, __pyx_L1_error)
4030  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(0, 274, __pyx_L1_error)
4031  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(0, 275, __pyx_L1_error)
4032  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(0, 276, __pyx_L1_error)
4033  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(0, 277, __pyx_L1_error)
4034  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(0, 278, __pyx_L1_error)
4035  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(0, 279, __pyx_L1_error)
4036  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(0, 280, __pyx_L1_error)
4037  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(0, 281, __pyx_L1_error)
4038  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(0, 286, __pyx_L1_error)
4039  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(0, 287, __pyx_L1_error)
4040  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(0, 288, __pyx_L1_error)
4041  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(0, 289, __pyx_L1_error)
4042  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(0, 290, __pyx_L1_error)
4043  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(0, 291, __pyx_L1_error)
4044  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(0, 292, __pyx_L1_error)
4045  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(0, 293, __pyx_L1_error)
4046  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(0, 294, __pyx_L1_error)
4047  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(0, 296, __pyx_L1_error)
4048  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(0, 297, __pyx_L1_error)
4049  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(0, 298, __pyx_L1_error)
4050  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(0, 299, __pyx_L1_error)
4051  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(0, 300, __pyx_L1_error)
4052  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(0, 301, __pyx_L1_error)
4053  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(0, 302, __pyx_L1_error)
4054  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(0, 305, __pyx_L1_error)
4055  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(0, 306, __pyx_L1_error)
4056  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_u_u", 0))) __PYX_ERR(0, 307, __pyx_L1_error)
4057  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_u_u", 0))) __PYX_ERR(0, 308, __pyx_L1_error)
4058  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(0, 311, __pyx_L1_error)
4059  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(0, 312, __pyx_L1_error)
4060  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(0, 313, __pyx_L1_error)
4061  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(0, 314, __pyx_L1_error)
4062  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(0, 315, __pyx_L1_error)
4063  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(0, 316, __pyx_L1_error)
4064  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(0, 317, __pyx_L1_error)
4065  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(0, 318, __pyx_L1_error)
4066  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(0, 319, __pyx_L1_error)
4067  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(0, 320, __pyx_L1_error)
4068  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(0, 321, __pyx_L1_error)
4069  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_u_u", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
4070  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(0, 323, __pyx_L1_error)
4071  __pyx_r = __pyx_pf_3ADR_3ADR_6calculateJacobian(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_csrRowIndeces_u_u, __pyx_v_csrColumnOffsets_u_u, __pyx_v_globalJacobian, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_csrColumnOffsets_eb_u_u, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
4072 
4073  /* function exit code */
4074  goto __pyx_L0;
4075  __pyx_L1_error:;
4076  __pyx_r = NULL;
4077  __pyx_L0:;
4078  __Pyx_RefNannyFinishContext();
4079  return __pyx_r;
4080 }
4081 
4082 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
4083  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
4084  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
4085  PyArrayObject *__pyx_v_globalJacobian_a = 0;
4086  PyObject *__pyx_r = NULL;
4087  __Pyx_RefNannyDeclarations
4088  PyObject *__pyx_t_1 = NULL;
4089  PyObject *__pyx_t_2 = NULL;
4090  PyObject *__pyx_t_3 = NULL;
4091  PyObject *__pyx_t_4 = NULL;
4092  PyObject *__pyx_t_5 = NULL;
4093  PyObject *(*__pyx_t_6)(PyObject *);
4094  __Pyx_RefNannySetupContext("calculateJacobian", 0);
4095 
4096  /* "ADR.pyx":329
4097  * """
4098  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4099  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation() # <<<<<<<<<<<<<<
4100  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data,
4101  * <double*> mesh_grad_trial_ref.data,
4102  */
4103  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_globalJacobian, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
4104  __Pyx_GOTREF(__pyx_t_2);
4105  __pyx_t_3 = NULL;
4106  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4107  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4108  if (likely(__pyx_t_3)) {
4109  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4110  __Pyx_INCREF(__pyx_t_3);
4111  __Pyx_INCREF(function);
4112  __Pyx_DECREF_SET(__pyx_t_2, function);
4113  }
4114  }
4115  if (__pyx_t_3) {
4116  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4117  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4118  } else {
4119  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4120  }
4121  __Pyx_GOTREF(__pyx_t_1);
4122  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4123  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
4124  PyObject* sequence = __pyx_t_1;
4125  #if !CYTHON_COMPILING_IN_PYPY
4126  Py_ssize_t size = Py_SIZE(sequence);
4127  #else
4128  Py_ssize_t size = PySequence_Size(sequence);
4129  #endif
4130  if (unlikely(size != 3)) {
4131  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
4132  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4133  __PYX_ERR(0, 329, __pyx_L1_error)
4134  }
4135  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4136  if (likely(PyTuple_CheckExact(sequence))) {
4137  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
4138  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
4139  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
4140  } else {
4141  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
4142  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
4143  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
4144  }
4145  __Pyx_INCREF(__pyx_t_2);
4146  __Pyx_INCREF(__pyx_t_3);
4147  __Pyx_INCREF(__pyx_t_4);
4148  #else
4149  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
4150  __Pyx_GOTREF(__pyx_t_2);
4151  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
4152  __Pyx_GOTREF(__pyx_t_3);
4153  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error)
4154  __Pyx_GOTREF(__pyx_t_4);
4155  #endif
4156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4157  } else {
4158  Py_ssize_t index = -1;
4159  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L1_error)
4160  __Pyx_GOTREF(__pyx_t_5);
4161  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4162  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
4163  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
4164  __Pyx_GOTREF(__pyx_t_2);
4165  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
4166  __Pyx_GOTREF(__pyx_t_3);
4167  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
4168  __Pyx_GOTREF(__pyx_t_4);
4169  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
4170  __pyx_t_6 = NULL;
4171  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4172  goto __pyx_L4_unpacking_done;
4173  __pyx_L3_unpacking_failed:;
4174  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4175  __pyx_t_6 = NULL;
4176  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4177  __PYX_ERR(0, 329, __pyx_L1_error)
4178  __pyx_L4_unpacking_done:;
4179  }
4180  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4181  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4182  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 329, __pyx_L1_error)
4183  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
4184  __pyx_t_2 = 0;
4185  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
4186  __pyx_t_3 = 0;
4187  __pyx_v_globalJacobian_a = ((PyArrayObject *)__pyx_t_4);
4188  __pyx_t_4 = 0;
4189 
4190  /* "ADR.pyx":330
4191  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4192  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation()
4193  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
4194  * <double*> mesh_grad_trial_ref.data,
4195  * <double*> mesh_dof.data,
4196  */
4197  __pyx_v_self->thisptr->calculateJacobian(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), ((int *)__pyx_v_csrRowIndeces_u_u->data), ((int *)__pyx_v_csrColumnOffsets_u_u->data), ((double *)__pyx_v_globalJacobian_a->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((int *)__pyx_v_csrColumnOffsets_eb_u_u->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
4198 
4199  /* "ADR.pyx":270
4200  * <double*> ebqe_penalty.data,
4201  * adjoint_sigma)
4202  * def calculateJacobian(self, # <<<<<<<<<<<<<<
4203  * numpy.ndarray mesh_trial_ref,
4204  * numpy.ndarray mesh_grad_trial_ref,
4205  */
4206 
4207  /* function exit code */
4208  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4209  goto __pyx_L0;
4210  __pyx_L1_error:;
4211  __Pyx_XDECREF(__pyx_t_1);
4212  __Pyx_XDECREF(__pyx_t_2);
4213  __Pyx_XDECREF(__pyx_t_3);
4214  __Pyx_XDECREF(__pyx_t_4);
4215  __Pyx_XDECREF(__pyx_t_5);
4216  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4217  __pyx_r = NULL;
4218  __pyx_L0:;
4219  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
4220  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
4221  __Pyx_XDECREF((PyObject *)__pyx_v_globalJacobian_a);
4222  __Pyx_XGIVEREF(__pyx_r);
4223  __Pyx_RefNannyFinishContext();
4224  return __pyx_r;
4225 }
4226 
4227 /* "ADR.pyx":394
4228  * """
4229  *
4230  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4231  * SGE_base.__init__(self,coefficients,nd,lag=False)
4232  * def initializeElementQuadrature(self,mesh,t,cq):
4233  */
4234 
4235 /* Python wrapper */
4236 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4237 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_12SubgridError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
4238 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4239  PyObject *__pyx_v_self = 0;
4240  PyObject *__pyx_v_coefficients = 0;
4241  PyObject *__pyx_v_nd = 0;
4242  PyObject *__pyx_r = 0;
4243  __Pyx_RefNannyDeclarations
4244  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4245  {
4246  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,0};
4247  PyObject* values[3] = {0,0,0};
4248  if (unlikely(__pyx_kwds)) {
4249  Py_ssize_t kw_args;
4250  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4251  switch (pos_args) {
4252  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4253  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4254  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4255  case 0: break;
4256  default: goto __pyx_L5_argtuple_error;
4257  }
4258  kw_args = PyDict_Size(__pyx_kwds);
4259  switch (pos_args) {
4260  case 0:
4261  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4262  else goto __pyx_L5_argtuple_error;
4263  case 1:
4264  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
4265  else {
4266  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 394, __pyx_L3_error)
4267  }
4268  case 2:
4269  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
4270  else {
4271  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 394, __pyx_L3_error)
4272  }
4273  }
4274  if (unlikely(kw_args > 0)) {
4275  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 394, __pyx_L3_error)
4276  }
4277  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
4278  goto __pyx_L5_argtuple_error;
4279  } else {
4280  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4281  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4282  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4283  }
4284  __pyx_v_self = values[0];
4285  __pyx_v_coefficients = values[1];
4286  __pyx_v_nd = values[2];
4287  }
4288  goto __pyx_L4_argument_unpacking_done;
4289  __pyx_L5_argtuple_error:;
4290  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
4291  __pyx_L3_error:;
4292  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4293  __Pyx_RefNannyFinishContext();
4294  return NULL;
4295  __pyx_L4_argument_unpacking_done:;
4296  __pyx_r = __pyx_pf_3ADR_12SubgridError___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd);
4297 
4298  /* function exit code */
4299  __Pyx_RefNannyFinishContext();
4300  return __pyx_r;
4301 }
4302 
4303 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd) {
4304  PyObject *__pyx_r = NULL;
4305  __Pyx_RefNannyDeclarations
4306  PyObject *__pyx_t_1 = NULL;
4307  PyObject *__pyx_t_2 = NULL;
4308  PyObject *__pyx_t_3 = NULL;
4309  PyObject *__pyx_t_4 = NULL;
4310  __Pyx_RefNannySetupContext("__init__", 0);
4311 
4312  /* "ADR.pyx":395
4313  *
4314  * def __init__(self,coefficients,nd):
4315  * SGE_base.__init__(self,coefficients,nd,lag=False) # <<<<<<<<<<<<<<
4316  * def initializeElementQuadrature(self,mesh,t,cq):
4317  * pass
4318  */
4319  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SGE_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
4320  __Pyx_GOTREF(__pyx_t_1);
4321  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
4322  __Pyx_GOTREF(__pyx_t_2);
4323  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4324  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
4325  __Pyx_GOTREF(__pyx_t_1);
4326  __Pyx_INCREF(__pyx_v_self);
4327  __Pyx_GIVEREF(__pyx_v_self);
4328  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
4329  __Pyx_INCREF(__pyx_v_coefficients);
4330  __Pyx_GIVEREF(__pyx_v_coefficients);
4331  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_coefficients);
4332  __Pyx_INCREF(__pyx_v_nd);
4333  __Pyx_GIVEREF(__pyx_v_nd);
4334  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nd);
4335  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
4336  __Pyx_GOTREF(__pyx_t_3);
4337  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
4338  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
4339  __Pyx_GOTREF(__pyx_t_4);
4340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4341  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4342  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4343  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4344 
4345  /* "ADR.pyx":394
4346  * """
4347  *
4348  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4349  * SGE_base.__init__(self,coefficients,nd,lag=False)
4350  * def initializeElementQuadrature(self,mesh,t,cq):
4351  */
4352 
4353  /* function exit code */
4354  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4355  goto __pyx_L0;
4356  __pyx_L1_error:;
4357  __Pyx_XDECREF(__pyx_t_1);
4358  __Pyx_XDECREF(__pyx_t_2);
4359  __Pyx_XDECREF(__pyx_t_3);
4360  __Pyx_XDECREF(__pyx_t_4);
4361  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4362  __pyx_r = NULL;
4363  __pyx_L0:;
4364  __Pyx_XGIVEREF(__pyx_r);
4365  __Pyx_RefNannyFinishContext();
4366  return __pyx_r;
4367 }
4368 
4369 /* "ADR.pyx":396
4370  * def __init__(self,coefficients,nd):
4371  * SGE_base.__init__(self,coefficients,nd,lag=False)
4372  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
4373  * pass
4374  * def updateSubgridErrorHistory(self,initializationPhase=False):
4375  */
4376 
4377 /* Python wrapper */
4378 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4379 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
4380 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4381  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4382  CYTHON_UNUSED PyObject *__pyx_v_mesh = 0;
4383  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
4384  CYTHON_UNUSED PyObject *__pyx_v_cq = 0;
4385  PyObject *__pyx_r = 0;
4386  __Pyx_RefNannyDeclarations
4387  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
4388  {
4389  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
4390  PyObject* values[4] = {0,0,0,0};
4391  if (unlikely(__pyx_kwds)) {
4392  Py_ssize_t kw_args;
4393  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4394  switch (pos_args) {
4395  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4396  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4397  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4398  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4399  case 0: break;
4400  default: goto __pyx_L5_argtuple_error;
4401  }
4402  kw_args = PyDict_Size(__pyx_kwds);
4403  switch (pos_args) {
4404  case 0:
4405  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4406  else goto __pyx_L5_argtuple_error;
4407  case 1:
4408  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
4409  else {
4410  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 396, __pyx_L3_error)
4411  }
4412  case 2:
4413  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4414  else {
4415  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 396, __pyx_L3_error)
4416  }
4417  case 3:
4418  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
4419  else {
4420  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 396, __pyx_L3_error)
4421  }
4422  }
4423  if (unlikely(kw_args > 0)) {
4424  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 396, __pyx_L3_error)
4425  }
4426  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4427  goto __pyx_L5_argtuple_error;
4428  } else {
4429  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4430  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4431  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4432  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4433  }
4434  __pyx_v_self = values[0];
4435  __pyx_v_mesh = values[1];
4436  __pyx_v_t = values[2];
4437  __pyx_v_cq = values[3];
4438  }
4439  goto __pyx_L4_argument_unpacking_done;
4440  __pyx_L5_argtuple_error:;
4441  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 396, __pyx_L3_error)
4442  __pyx_L3_error:;
4443  __Pyx_AddTraceback("ADR.SubgridError.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
4444  __Pyx_RefNannyFinishContext();
4445  return NULL;
4446  __pyx_L4_argument_unpacking_done:;
4447  __pyx_r = __pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
4448 
4449  /* function exit code */
4450  __Pyx_RefNannyFinishContext();
4451  return __pyx_r;
4452 }
4453 
4454 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq) {
4455  PyObject *__pyx_r = NULL;
4456  __Pyx_RefNannyDeclarations
4457  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
4458 
4459  /* function exit code */
4460  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4461  __Pyx_XGIVEREF(__pyx_r);
4462  __Pyx_RefNannyFinishContext();
4463  return __pyx_r;
4464 }
4465 
4466 /* "ADR.pyx":398
4467  * def initializeElementQuadrature(self,mesh,t,cq):
4468  * pass
4469  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
4470  * pass
4471  * def calculateSubgridError(self,q):
4472  */
4473 
4474 /* Python wrapper */
4475 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4476 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory = {"updateSubgridErrorHistory", (PyCFunction)__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory, METH_VARARGS|METH_KEYWORDS, 0};
4477 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4478  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4479  CYTHON_UNUSED PyObject *__pyx_v_initializationPhase = 0;
4480  PyObject *__pyx_r = 0;
4481  __Pyx_RefNannyDeclarations
4482  __Pyx_RefNannySetupContext("updateSubgridErrorHistory (wrapper)", 0);
4483  {
4484  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_initializationPhase,0};
4485  PyObject* values[2] = {0,0};
4486  values[1] = ((PyObject *)((PyObject *)Py_False));
4487  if (unlikely(__pyx_kwds)) {
4488  Py_ssize_t kw_args;
4489  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4490  switch (pos_args) {
4491  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4492  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4493  case 0: break;
4494  default: goto __pyx_L5_argtuple_error;
4495  }
4496  kw_args = PyDict_Size(__pyx_kwds);
4497  switch (pos_args) {
4498  case 0:
4499  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4500  else goto __pyx_L5_argtuple_error;
4501  case 1:
4502  if (kw_args > 0) {
4503  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_initializationPhase);
4504  if (value) { values[1] = value; kw_args--; }
4505  }
4506  }
4507  if (unlikely(kw_args > 0)) {
4508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateSubgridErrorHistory") < 0)) __PYX_ERR(0, 398, __pyx_L3_error)
4509  }
4510  } else {
4511  switch (PyTuple_GET_SIZE(__pyx_args)) {
4512  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4513  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4514  break;
4515  default: goto __pyx_L5_argtuple_error;
4516  }
4517  }
4518  __pyx_v_self = values[0];
4519  __pyx_v_initializationPhase = values[1];
4520  }
4521  goto __pyx_L4_argument_unpacking_done;
4522  __pyx_L5_argtuple_error:;
4523  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorHistory", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 398, __pyx_L3_error)
4524  __pyx_L3_error:;
4525  __Pyx_AddTraceback("ADR.SubgridError.updateSubgridErrorHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
4526  __Pyx_RefNannyFinishContext();
4527  return NULL;
4528  __pyx_L4_argument_unpacking_done:;
4529  __pyx_r = __pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(__pyx_self, __pyx_v_self, __pyx_v_initializationPhase);
4530 
4531  /* function exit code */
4532  __Pyx_RefNannyFinishContext();
4533  return __pyx_r;
4534 }
4535 
4536 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase) {
4537  PyObject *__pyx_r = NULL;
4538  __Pyx_RefNannyDeclarations
4539  __Pyx_RefNannySetupContext("updateSubgridErrorHistory", 0);
4540 
4541  /* function exit code */
4542  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4543  __Pyx_XGIVEREF(__pyx_r);
4544  __Pyx_RefNannyFinishContext();
4545  return __pyx_r;
4546 }
4547 
4548 /* "ADR.pyx":400
4549  * def updateSubgridErrorHistory(self,initializationPhase=False):
4550  * pass
4551  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
4552  * pass
4553  *
4554  */
4555 
4556 /* Python wrapper */
4557 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4558 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_7calculateSubgridError = {"calculateSubgridError", (PyCFunction)__pyx_pw_3ADR_12SubgridError_7calculateSubgridError, METH_VARARGS|METH_KEYWORDS, 0};
4559 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4560  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4561  CYTHON_UNUSED PyObject *__pyx_v_q = 0;
4562  PyObject *__pyx_r = 0;
4563  __Pyx_RefNannyDeclarations
4564  __Pyx_RefNannySetupContext("calculateSubgridError (wrapper)", 0);
4565  {
4566  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_q,0};
4567  PyObject* values[2] = {0,0};
4568  if (unlikely(__pyx_kwds)) {
4569  Py_ssize_t kw_args;
4570  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4571  switch (pos_args) {
4572  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4573  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4574  case 0: break;
4575  default: goto __pyx_L5_argtuple_error;
4576  }
4577  kw_args = PyDict_Size(__pyx_kwds);
4578  switch (pos_args) {
4579  case 0:
4580  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4581  else goto __pyx_L5_argtuple_error;
4582  case 1:
4583  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
4584  else {
4585  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, 1); __PYX_ERR(0, 400, __pyx_L3_error)
4586  }
4587  }
4588  if (unlikely(kw_args > 0)) {
4589  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateSubgridError") < 0)) __PYX_ERR(0, 400, __pyx_L3_error)
4590  }
4591  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4592  goto __pyx_L5_argtuple_error;
4593  } else {
4594  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4595  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4596  }
4597  __pyx_v_self = values[0];
4598  __pyx_v_q = values[1];
4599  }
4600  goto __pyx_L4_argument_unpacking_done;
4601  __pyx_L5_argtuple_error:;
4602  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error)
4603  __pyx_L3_error:;
4604  __Pyx_AddTraceback("ADR.SubgridError.calculateSubgridError", __pyx_clineno, __pyx_lineno, __pyx_filename);
4605  __Pyx_RefNannyFinishContext();
4606  return NULL;
4607  __pyx_L4_argument_unpacking_done:;
4608  __pyx_r = __pyx_pf_3ADR_12SubgridError_6calculateSubgridError(__pyx_self, __pyx_v_self, __pyx_v_q);
4609 
4610  /* function exit code */
4611  __Pyx_RefNannyFinishContext();
4612  return __pyx_r;
4613 }
4614 
4615 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q) {
4616  PyObject *__pyx_r = NULL;
4617  __Pyx_RefNannyDeclarations
4618  __Pyx_RefNannySetupContext("calculateSubgridError", 0);
4619 
4620  /* function exit code */
4621  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4622  __Pyx_XGIVEREF(__pyx_r);
4623  __Pyx_RefNannyFinishContext();
4624  return __pyx_r;
4625 }
4626 
4627 /* "ADR.pyx":410
4628  * :parts: 2
4629  * """
4630  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
4631  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4632  * self.nStepsToDelay = nStepsToDelay
4633  */
4634 
4635 /* Python wrapper */
4636 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4637 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
4638 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4639  PyObject *__pyx_v_self = 0;
4640  PyObject *__pyx_v_coefficients = 0;
4641  PyObject *__pyx_v_nd = 0;
4642  PyObject *__pyx_v_shockCapturingFactor = 0;
4643  PyObject *__pyx_v_lag = 0;
4644  PyObject *__pyx_v_nStepsToDelay = 0;
4645  PyObject *__pyx_r = 0;
4646  __Pyx_RefNannyDeclarations
4647  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4648  {
4649  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,&__pyx_n_s_shockCapturingFactor,&__pyx_n_s_lag,&__pyx_n_s_nStepsToDelay,0};
4650  PyObject* values[6] = {0,0,0,0,0,0};
4651  values[3] = ((PyObject *)((PyObject*)__pyx_float_0_25));
4652  values[4] = ((PyObject *)((PyObject *)Py_True));
4653  values[5] = ((PyObject *)((PyObject *)Py_None));
4654  if (unlikely(__pyx_kwds)) {
4655  Py_ssize_t kw_args;
4656  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4657  switch (pos_args) {
4658  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4659  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4660  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4661  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4662  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4663  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4664  case 0: break;
4665  default: goto __pyx_L5_argtuple_error;
4666  }
4667  kw_args = PyDict_Size(__pyx_kwds);
4668  switch (pos_args) {
4669  case 0:
4670  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4671  else goto __pyx_L5_argtuple_error;
4672  case 1:
4673  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
4674  else {
4675  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 1); __PYX_ERR(0, 410, __pyx_L3_error)
4676  }
4677  case 2:
4678  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
4679  else {
4680  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 2); __PYX_ERR(0, 410, __pyx_L3_error)
4681  }
4682  case 3:
4683  if (kw_args > 0) {
4684  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturingFactor);
4685  if (value) { values[3] = value; kw_args--; }
4686  }
4687  case 4:
4688  if (kw_args > 0) {
4689  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag);
4690  if (value) { values[4] = value; kw_args--; }
4691  }
4692  case 5:
4693  if (kw_args > 0) {
4694  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nStepsToDelay);
4695  if (value) { values[5] = value; kw_args--; }
4696  }
4697  }
4698  if (unlikely(kw_args > 0)) {
4699  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 410, __pyx_L3_error)
4700  }
4701  } else {
4702  switch (PyTuple_GET_SIZE(__pyx_args)) {
4703  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4704  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4705  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4706  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4707  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4708  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4709  break;
4710  default: goto __pyx_L5_argtuple_error;
4711  }
4712  }
4713  __pyx_v_self = values[0];
4714  __pyx_v_coefficients = values[1];
4715  __pyx_v_nd = values[2];
4716  __pyx_v_shockCapturingFactor = values[3];
4717  __pyx_v_lag = values[4];
4718  __pyx_v_nStepsToDelay = values[5];
4719  }
4720  goto __pyx_L4_argument_unpacking_done;
4721  __pyx_L5_argtuple_error:;
4722  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 410, __pyx_L3_error)
4723  __pyx_L3_error:;
4724  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4725  __Pyx_RefNannyFinishContext();
4726  return NULL;
4727  __pyx_L4_argument_unpacking_done:;
4728  __pyx_r = __pyx_pf_3ADR_14ShockCapturing___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag, __pyx_v_nStepsToDelay);
4729 
4730  /* function exit code */
4731  __Pyx_RefNannyFinishContext();
4732  return __pyx_r;
4733 }
4734 
4735 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay) {
4736  PyObject *__pyx_r = NULL;
4737  __Pyx_RefNannyDeclarations
4738  PyObject *__pyx_t_1 = NULL;
4739  PyObject *__pyx_t_2 = NULL;
4740  PyObject *__pyx_t_3 = NULL;
4741  int __pyx_t_4;
4742  PyObject *__pyx_t_5 = NULL;
4743  int __pyx_t_6;
4744  __Pyx_RefNannySetupContext("__init__", 0);
4745 
4746  /* "ADR.pyx":411
4747  * """
4748  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
4749  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag) # <<<<<<<<<<<<<<
4750  * self.nStepsToDelay = nStepsToDelay
4751  * self.nSteps=0
4752  */
4753  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
4754  __Pyx_GOTREF(__pyx_t_2);
4755  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
4756  __Pyx_GOTREF(__pyx_t_3);
4757  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4758  __pyx_t_2 = NULL;
4759  __pyx_t_4 = 0;
4760  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4761  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4762  if (likely(__pyx_t_2)) {
4763  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4764  __Pyx_INCREF(__pyx_t_2);
4765  __Pyx_INCREF(function);
4766  __Pyx_DECREF_SET(__pyx_t_3, function);
4767  __pyx_t_4 = 1;
4768  }
4769  }
4770  #if CYTHON_FAST_PYCALL
4771  if (PyFunction_Check(__pyx_t_3)) {
4772  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
4773  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4774  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4775  __Pyx_GOTREF(__pyx_t_1);
4776  } else
4777  #endif
4778  #if CYTHON_FAST_PYCCALL
4779  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4780  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
4781  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4782  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4783  __Pyx_GOTREF(__pyx_t_1);
4784  } else
4785  #endif
4786  {
4787  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error)
4788  __Pyx_GOTREF(__pyx_t_5);
4789  if (__pyx_t_2) {
4790  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
4791  }
4792  __Pyx_INCREF(__pyx_v_self);
4793  __Pyx_GIVEREF(__pyx_v_self);
4794  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
4795  __Pyx_INCREF(__pyx_v_coefficients);
4796  __Pyx_GIVEREF(__pyx_v_coefficients);
4797  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_coefficients);
4798  __Pyx_INCREF(__pyx_v_nd);
4799  __Pyx_GIVEREF(__pyx_v_nd);
4800  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_nd);
4801  __Pyx_INCREF(__pyx_v_shockCapturingFactor);
4802  __Pyx_GIVEREF(__pyx_v_shockCapturingFactor);
4803  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_shockCapturingFactor);
4804  __Pyx_INCREF(__pyx_v_lag);
4805  __Pyx_GIVEREF(__pyx_v_lag);
4806  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_lag);
4807  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
4808  __Pyx_GOTREF(__pyx_t_1);
4809  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4810  }
4811  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4812  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4813 
4814  /* "ADR.pyx":412
4815  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
4816  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4817  * self.nStepsToDelay = nStepsToDelay # <<<<<<<<<<<<<<
4818  * self.nSteps=0
4819  * if self.lag:
4820  */
4821  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_v_nStepsToDelay) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
4822 
4823  /* "ADR.pyx":413
4824  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4825  * self.nStepsToDelay = nStepsToDelay
4826  * self.nSteps=0 # <<<<<<<<<<<<<<
4827  * if self.lag:
4828  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4829  */
4830  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_int_0) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
4831 
4832  /* "ADR.pyx":414
4833  * self.nStepsToDelay = nStepsToDelay
4834  * self.nSteps=0
4835  * if self.lag: # <<<<<<<<<<<<<<
4836  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4837  * self.nStepsToDelay=1
4838  */
4839  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
4840  __Pyx_GOTREF(__pyx_t_1);
4841  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
4842  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4843  if (__pyx_t_6) {
4844 
4845  /* "ADR.pyx":415
4846  * self.nSteps=0
4847  * if self.lag:
4848  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying") # <<<<<<<<<<<<<<
4849  * self.nStepsToDelay=1
4850  * self.lag=False
4851  */
4852  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
4853  __Pyx_GOTREF(__pyx_t_1);
4854  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
4855  __Pyx_GOTREF(__pyx_t_3);
4856  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4857  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4858 
4859  /* "ADR.pyx":416
4860  * if self.lag:
4861  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4862  * self.nStepsToDelay=1 # <<<<<<<<<<<<<<
4863  * self.lag=False
4864  * def initializeElementQuadrature(self,mesh,t,cq):
4865  */
4866  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_int_1) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
4867 
4868  /* "ADR.pyx":417
4869  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4870  * self.nStepsToDelay=1
4871  * self.lag=False # <<<<<<<<<<<<<<
4872  * def initializeElementQuadrature(self,mesh,t,cq):
4873  * self.mesh=mesh
4874  */
4875  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
4876 
4877  /* "ADR.pyx":414
4878  * self.nStepsToDelay = nStepsToDelay
4879  * self.nSteps=0
4880  * if self.lag: # <<<<<<<<<<<<<<
4881  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
4882  * self.nStepsToDelay=1
4883  */
4884  }
4885 
4886  /* "ADR.pyx":410
4887  * :parts: 2
4888  * """
4889  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
4890  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
4891  * self.nStepsToDelay = nStepsToDelay
4892  */
4893 
4894  /* function exit code */
4895  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4896  goto __pyx_L0;
4897  __pyx_L1_error:;
4898  __Pyx_XDECREF(__pyx_t_1);
4899  __Pyx_XDECREF(__pyx_t_2);
4900  __Pyx_XDECREF(__pyx_t_3);
4901  __Pyx_XDECREF(__pyx_t_5);
4902  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4903  __pyx_r = NULL;
4904  __pyx_L0:;
4905  __Pyx_XGIVEREF(__pyx_r);
4906  __Pyx_RefNannyFinishContext();
4907  return __pyx_r;
4908 }
4909 
4910 /* "ADR.pyx":418
4911  * self.nStepsToDelay=1
4912  * self.lag=False
4913  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
4914  * self.mesh=mesh
4915  * self.numDiff=[]
4916  */
4917 
4918 /* Python wrapper */
4919 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4920 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
4921 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4922  PyObject *__pyx_v_self = 0;
4923  PyObject *__pyx_v_mesh = 0;
4924  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
4925  PyObject *__pyx_v_cq = 0;
4926  PyObject *__pyx_r = 0;
4927  __Pyx_RefNannyDeclarations
4928  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
4929  {
4930  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
4931  PyObject* values[4] = {0,0,0,0};
4932  if (unlikely(__pyx_kwds)) {
4933  Py_ssize_t kw_args;
4934  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4935  switch (pos_args) {
4936  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4937  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4938  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4939  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4940  case 0: break;
4941  default: goto __pyx_L5_argtuple_error;
4942  }
4943  kw_args = PyDict_Size(__pyx_kwds);
4944  switch (pos_args) {
4945  case 0:
4946  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4947  else goto __pyx_L5_argtuple_error;
4948  case 1:
4949  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
4950  else {
4951  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 418, __pyx_L3_error)
4952  }
4953  case 2:
4954  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4955  else {
4956  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 418, __pyx_L3_error)
4957  }
4958  case 3:
4959  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
4960  else {
4961  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 418, __pyx_L3_error)
4962  }
4963  }
4964  if (unlikely(kw_args > 0)) {
4965  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 418, __pyx_L3_error)
4966  }
4967  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4968  goto __pyx_L5_argtuple_error;
4969  } else {
4970  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4971  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4972  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4973  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4974  }
4975  __pyx_v_self = values[0];
4976  __pyx_v_mesh = values[1];
4977  __pyx_v_t = values[2];
4978  __pyx_v_cq = values[3];
4979  }
4980  goto __pyx_L4_argument_unpacking_done;
4981  __pyx_L5_argtuple_error:;
4982  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 418, __pyx_L3_error)
4983  __pyx_L3_error:;
4984  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
4985  __Pyx_RefNannyFinishContext();
4986  return NULL;
4987  __pyx_L4_argument_unpacking_done:;
4988  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
4989 
4990  /* function exit code */
4991  __Pyx_RefNannyFinishContext();
4992  return __pyx_r;
4993 }
4994 
4995 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
4996  PyObject *__pyx_v_ci = NULL;
4997  PyObject *__pyx_r = NULL;
4998  __Pyx_RefNannyDeclarations
4999  PyObject *__pyx_t_1 = NULL;
5000  PyObject *__pyx_t_2 = NULL;
5001  Py_ssize_t __pyx_t_3;
5002  PyObject *(*__pyx_t_4)(PyObject *);
5003  PyObject *__pyx_t_5 = NULL;
5004  PyObject *__pyx_t_6 = NULL;
5005  int __pyx_t_7;
5006  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
5007 
5008  /* "ADR.pyx":419
5009  * self.lag=False
5010  * def initializeElementQuadrature(self,mesh,t,cq):
5011  * self.mesh=mesh # <<<<<<<<<<<<<<
5012  * self.numDiff=[]
5013  * self.numDiff_last=[]
5014  */
5015  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_v_mesh) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
5016 
5017  /* "ADR.pyx":420
5018  * def initializeElementQuadrature(self,mesh,t,cq):
5019  * self.mesh=mesh
5020  * self.numDiff=[] # <<<<<<<<<<<<<<
5021  * self.numDiff_last=[]
5022  * for ci in range(self.nc):
5023  */
5024  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
5025  __Pyx_GOTREF(__pyx_t_1);
5026  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff, __pyx_t_1) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
5027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5028 
5029  /* "ADR.pyx":421
5030  * self.mesh=mesh
5031  * self.numDiff=[]
5032  * self.numDiff_last=[] # <<<<<<<<<<<<<<
5033  * for ci in range(self.nc):
5034  * self.numDiff.append(cq[('numDiff',ci,ci)])
5035  */
5036  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
5037  __Pyx_GOTREF(__pyx_t_1);
5038  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_1) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
5039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5040 
5041  /* "ADR.pyx":422
5042  * self.numDiff=[]
5043  * self.numDiff_last=[]
5044  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5045  * self.numDiff.append(cq[('numDiff',ci,ci)])
5046  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5047  */
5048  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5049  __Pyx_GOTREF(__pyx_t_1);
5050  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
5051  __Pyx_GOTREF(__pyx_t_2);
5052  __Pyx_GIVEREF(__pyx_t_1);
5053  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5054  __pyx_t_1 = 0;
5055  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5056  __Pyx_GOTREF(__pyx_t_1);
5057  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5058  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5059  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
5060  __pyx_t_4 = NULL;
5061  } else {
5062  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
5063  __Pyx_GOTREF(__pyx_t_2);
5064  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
5065  }
5066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5067  for (;;) {
5068  if (likely(!__pyx_t_4)) {
5069  if (likely(PyList_CheckExact(__pyx_t_2))) {
5070  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
5071  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5072  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
5073  #else
5074  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5075  __Pyx_GOTREF(__pyx_t_1);
5076  #endif
5077  } else {
5078  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5079  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5080  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
5081  #else
5082  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
5083  __Pyx_GOTREF(__pyx_t_1);
5084  #endif
5085  }
5086  } else {
5087  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
5088  if (unlikely(!__pyx_t_1)) {
5089  PyObject* exc_type = PyErr_Occurred();
5090  if (exc_type) {
5091  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5092  else __PYX_ERR(0, 422, __pyx_L1_error)
5093  }
5094  break;
5095  }
5096  __Pyx_GOTREF(__pyx_t_1);
5097  }
5098  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
5099  __pyx_t_1 = 0;
5100 
5101  /* "ADR.pyx":423
5102  * self.numDiff_last=[]
5103  * for ci in range(self.nc):
5104  * self.numDiff.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5105  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5106  * def updateShockCapturingHistory(self):
5107  */
5108  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
5109  __Pyx_GOTREF(__pyx_t_1);
5110  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error)
5111  __Pyx_GOTREF(__pyx_t_5);
5112  __Pyx_INCREF(__pyx_n_s_numDiff);
5113  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5114  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_numDiff);
5115  __Pyx_INCREF(__pyx_v_ci);
5116  __Pyx_GIVEREF(__pyx_v_ci);
5117  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
5118  __Pyx_INCREF(__pyx_v_ci);
5119  __Pyx_GIVEREF(__pyx_v_ci);
5120  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
5121  __pyx_t_6 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error)
5122  __Pyx_GOTREF(__pyx_t_6);
5123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5124  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_6); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 423, __pyx_L1_error)
5125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5126  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5127 
5128  /* "ADR.pyx":424
5129  * for ci in range(self.nc):
5130  * self.numDiff.append(cq[('numDiff',ci,ci)])
5131  * self.numDiff_last.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5132  * def updateShockCapturingHistory(self):
5133  * self.nSteps += 1
5134  */
5135  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 424, __pyx_L1_error)
5136  __Pyx_GOTREF(__pyx_t_6);
5137  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
5138  __Pyx_GOTREF(__pyx_t_1);
5139  __Pyx_INCREF(__pyx_n_s_numDiff);
5140  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5141  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_numDiff);
5142  __Pyx_INCREF(__pyx_v_ci);
5143  __Pyx_GIVEREF(__pyx_v_ci);
5144  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
5145  __Pyx_INCREF(__pyx_v_ci);
5146  __Pyx_GIVEREF(__pyx_v_ci);
5147  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
5148  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error)
5149  __Pyx_GOTREF(__pyx_t_5);
5150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5151  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 424, __pyx_L1_error)
5152  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5153  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5154 
5155  /* "ADR.pyx":422
5156  * self.numDiff=[]
5157  * self.numDiff_last=[]
5158  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5159  * self.numDiff.append(cq[('numDiff',ci,ci)])
5160  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5161  */
5162  }
5163  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5164 
5165  /* "ADR.pyx":418
5166  * self.nStepsToDelay=1
5167  * self.lag=False
5168  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
5169  * self.mesh=mesh
5170  * self.numDiff=[]
5171  */
5172 
5173  /* function exit code */
5174  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5175  goto __pyx_L0;
5176  __pyx_L1_error:;
5177  __Pyx_XDECREF(__pyx_t_1);
5178  __Pyx_XDECREF(__pyx_t_2);
5179  __Pyx_XDECREF(__pyx_t_5);
5180  __Pyx_XDECREF(__pyx_t_6);
5181  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
5182  __pyx_r = NULL;
5183  __pyx_L0:;
5184  __Pyx_XDECREF(__pyx_v_ci);
5185  __Pyx_XGIVEREF(__pyx_r);
5186  __Pyx_RefNannyFinishContext();
5187  return __pyx_r;
5188 }
5189 
5190 /* "ADR.pyx":425
5191  * self.numDiff.append(cq[('numDiff',ci,ci)])
5192  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5193  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
5194  * self.nSteps += 1
5195  * if self.lag:
5196  */
5197 
5198 /* Python wrapper */
5199 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
5200 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory = {"updateShockCapturingHistory", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory, METH_O, 0};
5201 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self) {
5202  PyObject *__pyx_r = 0;
5203  __Pyx_RefNannyDeclarations
5204  __Pyx_RefNannySetupContext("updateShockCapturingHistory (wrapper)", 0);
5205  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(__pyx_self, ((PyObject *)__pyx_v_self));
5206 
5207  /* function exit code */
5208  __Pyx_RefNannyFinishContext();
5209  return __pyx_r;
5210 }
5211 
5212 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
5213  PyObject *__pyx_v_ci = NULL;
5214  PyObject *__pyx_r = NULL;
5215  __Pyx_RefNannyDeclarations
5216  PyObject *__pyx_t_1 = NULL;
5217  PyObject *__pyx_t_2 = NULL;
5218  int __pyx_t_3;
5219  Py_ssize_t __pyx_t_4;
5220  PyObject *(*__pyx_t_5)(PyObject *);
5221  PyObject *__pyx_t_6 = NULL;
5222  PyObject *__pyx_t_7 = NULL;
5223  int __pyx_t_8;
5224  PyObject *__pyx_t_9 = NULL;
5225  int __pyx_t_10;
5226  PyObject *__pyx_t_11 = NULL;
5227  PyObject *__pyx_t_12 = NULL;
5228  __Pyx_RefNannySetupContext("updateShockCapturingHistory", 0);
5229 
5230  /* "ADR.pyx":426
5231  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5232  * def updateShockCapturingHistory(self):
5233  * self.nSteps += 1 # <<<<<<<<<<<<<<
5234  * if self.lag:
5235  * for ci in range(self.nc):
5236  */
5237  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error)
5238  __Pyx_GOTREF(__pyx_t_1);
5239  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error)
5240  __Pyx_GOTREF(__pyx_t_2);
5241  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5242  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_t_2) < 0) __PYX_ERR(0, 426, __pyx_L1_error)
5243  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5244 
5245  /* "ADR.pyx":427
5246  * def updateShockCapturingHistory(self):
5247  * self.nSteps += 1
5248  * if self.lag: # <<<<<<<<<<<<<<
5249  * for ci in range(self.nc):
5250  * self.numDiff_last[ci][:] = self.numDiff[ci]
5251  */
5252  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
5253  __Pyx_GOTREF(__pyx_t_2);
5254  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
5255  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5256  if (__pyx_t_3) {
5257 
5258  /* "ADR.pyx":428
5259  * self.nSteps += 1
5260  * if self.lag:
5261  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5262  * self.numDiff_last[ci][:] = self.numDiff[ci]
5263  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
5264  */
5265  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5266  __Pyx_GOTREF(__pyx_t_2);
5267  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
5268  __Pyx_GOTREF(__pyx_t_1);
5269  __Pyx_GIVEREF(__pyx_t_2);
5270  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
5271  __pyx_t_2 = 0;
5272  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5273  __Pyx_GOTREF(__pyx_t_2);
5274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5275  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
5276  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
5277  __pyx_t_5 = NULL;
5278  } else {
5279  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
5280  __Pyx_GOTREF(__pyx_t_1);
5281  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error)
5282  }
5283  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5284  for (;;) {
5285  if (likely(!__pyx_t_5)) {
5286  if (likely(PyList_CheckExact(__pyx_t_1))) {
5287  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
5288  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5289  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
5290  #else
5291  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5292  __Pyx_GOTREF(__pyx_t_2);
5293  #endif
5294  } else {
5295  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5296  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5297  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error)
5298  #else
5299  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
5300  __Pyx_GOTREF(__pyx_t_2);
5301  #endif
5302  }
5303  } else {
5304  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
5305  if (unlikely(!__pyx_t_2)) {
5306  PyObject* exc_type = PyErr_Occurred();
5307  if (exc_type) {
5308  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5309  else __PYX_ERR(0, 428, __pyx_L1_error)
5310  }
5311  break;
5312  }
5313  __Pyx_GOTREF(__pyx_t_2);
5314  }
5315  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
5316  __pyx_t_2 = 0;
5317 
5318  /* "ADR.pyx":429
5319  * if self.lag:
5320  * for ci in range(self.nc):
5321  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
5322  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
5323  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5324  */
5325  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
5326  __Pyx_GOTREF(__pyx_t_2);
5327  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
5328  __Pyx_GOTREF(__pyx_t_6);
5329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5330  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
5331  __Pyx_GOTREF(__pyx_t_2);
5332  __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
5333  __Pyx_GOTREF(__pyx_t_7);
5334  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5335  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_t_6, 0, 0, NULL, NULL, &__pyx_slice__2, 0, 0, 1) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
5336  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5337  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5338 
5339  /* "ADR.pyx":428
5340  * self.nSteps += 1
5341  * if self.lag:
5342  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5343  * self.numDiff_last[ci][:] = self.numDiff[ci]
5344  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
5345  */
5346  }
5347  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5348 
5349  /* "ADR.pyx":427
5350  * def updateShockCapturingHistory(self):
5351  * self.nSteps += 1
5352  * if self.lag: # <<<<<<<<<<<<<<
5353  * for ci in range(self.nc):
5354  * self.numDiff_last[ci][:] = self.numDiff[ci]
5355  */
5356  }
5357 
5358  /* "ADR.pyx":430
5359  * for ci in range(self.nc):
5360  * self.numDiff_last[ci][:] = self.numDiff[ci]
5361  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
5362  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5363  * self.lag = True
5364  */
5365  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
5366  __Pyx_GOTREF(__pyx_t_1);
5367  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5368  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5369  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
5370  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5371  if (__pyx_t_8) {
5372  } else {
5373  __pyx_t_3 = __pyx_t_8;
5374  goto __pyx_L7_bool_binop_done;
5375  }
5376  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5377  __Pyx_GOTREF(__pyx_t_6);
5378  __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
5379  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5380  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
5381  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5382  if (__pyx_t_8) {
5383  } else {
5384  __pyx_t_3 = __pyx_t_8;
5385  goto __pyx_L7_bool_binop_done;
5386  }
5387  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
5388  __Pyx_GOTREF(__pyx_t_1);
5389  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error)
5390  __Pyx_GOTREF(__pyx_t_6);
5391  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error)
5392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5393  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5394  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
5395  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5396  __pyx_t_3 = __pyx_t_8;
5397  __pyx_L7_bool_binop_done:;
5398  if (__pyx_t_3) {
5399 
5400  /* "ADR.pyx":431
5401  * self.numDiff_last[ci][:] = self.numDiff[ci]
5402  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
5403  * log("ADR.ShockCapturing: switched to lagged shock capturing") # <<<<<<<<<<<<<<
5404  * self.lag = True
5405  * self.numDiff_last=[]
5406  */
5407  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error)
5408  __Pyx_GOTREF(__pyx_t_7);
5409  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
5410  __Pyx_GOTREF(__pyx_t_6);
5411  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5412  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5413 
5414  /* "ADR.pyx":432
5415  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
5416  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5417  * self.lag = True # <<<<<<<<<<<<<<
5418  * self.numDiff_last=[]
5419  * for ci in range(self.nc):
5420  */
5421  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_True) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
5422 
5423  /* "ADR.pyx":433
5424  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5425  * self.lag = True
5426  * self.numDiff_last=[] # <<<<<<<<<<<<<<
5427  * for ci in range(self.nc):
5428  * self.numDiff_last.append(self.numDiff[ci].copy())
5429  */
5430  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error)
5431  __Pyx_GOTREF(__pyx_t_6);
5432  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_6) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
5433  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5434 
5435  /* "ADR.pyx":434
5436  * self.lag = True
5437  * self.numDiff_last=[]
5438  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5439  * self.numDiff_last.append(self.numDiff[ci].copy())
5440  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5441  */
5442  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
5443  __Pyx_GOTREF(__pyx_t_6);
5444  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error)
5445  __Pyx_GOTREF(__pyx_t_7);
5446  __Pyx_GIVEREF(__pyx_t_6);
5447  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
5448  __pyx_t_6 = 0;
5449  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
5450  __Pyx_GOTREF(__pyx_t_6);
5451  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5452  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
5453  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
5454  __pyx_t_5 = NULL;
5455  } else {
5456  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L1_error)
5457  __Pyx_GOTREF(__pyx_t_7);
5458  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error)
5459  }
5460  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5461  for (;;) {
5462  if (likely(!__pyx_t_5)) {
5463  if (likely(PyList_CheckExact(__pyx_t_7))) {
5464  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
5465  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5466  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
5467  #else
5468  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
5469  __Pyx_GOTREF(__pyx_t_6);
5470  #endif
5471  } else {
5472  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
5473  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5474  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
5475  #else
5476  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
5477  __Pyx_GOTREF(__pyx_t_6);
5478  #endif
5479  }
5480  } else {
5481  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
5482  if (unlikely(!__pyx_t_6)) {
5483  PyObject* exc_type = PyErr_Occurred();
5484  if (exc_type) {
5485  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5486  else __PYX_ERR(0, 434, __pyx_L1_error)
5487  }
5488  break;
5489  }
5490  __Pyx_GOTREF(__pyx_t_6);
5491  }
5492  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
5493  __pyx_t_6 = 0;
5494 
5495  /* "ADR.pyx":435
5496  * self.numDiff_last=[]
5497  * for ci in range(self.nc):
5498  * self.numDiff_last.append(self.numDiff[ci].copy()) # <<<<<<<<<<<<<<
5499  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5500  *
5501  */
5502  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
5503  __Pyx_GOTREF(__pyx_t_6);
5504  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
5505  __Pyx_GOTREF(__pyx_t_2);
5506  __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 435, __pyx_L1_error)
5507  __Pyx_GOTREF(__pyx_t_9);
5508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5509  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
5510  __Pyx_GOTREF(__pyx_t_2);
5511  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5512  __pyx_t_9 = NULL;
5513  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5514  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
5515  if (likely(__pyx_t_9)) {
5516  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5517  __Pyx_INCREF(__pyx_t_9);
5518  __Pyx_INCREF(function);
5519  __Pyx_DECREF_SET(__pyx_t_2, function);
5520  }
5521  }
5522  if (__pyx_t_9) {
5523  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
5524  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5525  } else {
5526  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
5527  }
5528  __Pyx_GOTREF(__pyx_t_1);
5529  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5530  __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 435, __pyx_L1_error)
5531  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5532  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5533 
5534  /* "ADR.pyx":434
5535  * self.lag = True
5536  * self.numDiff_last=[]
5537  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5538  * self.numDiff_last.append(self.numDiff[ci].copy())
5539  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
5540  */
5541  }
5542  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5543 
5544  /* "ADR.pyx":430
5545  * for ci in range(self.nc):
5546  * self.numDiff_last[ci][:] = self.numDiff[ci]
5547  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
5548  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5549  * self.lag = True
5550  */
5551  }
5552 
5553  /* "ADR.pyx":436
5554  * for ci in range(self.nc):
5555  * self.numDiff_last.append(self.numDiff[ci].copy())
5556  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),)) # <<<<<<<<<<<<<<
5557  *
5558  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5559  */
5560  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
5561  __Pyx_GOTREF(__pyx_t_1);
5562  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_globalMax); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
5563  __Pyx_GOTREF(__pyx_t_2);
5564  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 436, __pyx_L1_error)
5565  __Pyx_GOTREF(__pyx_t_11);
5566  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L1_error)
5567  __Pyx_GOTREF(__pyx_t_12);
5568  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5569  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_max); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 436, __pyx_L1_error)
5570  __Pyx_GOTREF(__pyx_t_11);
5571  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5572  __pyx_t_12 = NULL;
5573  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
5574  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
5575  if (likely(__pyx_t_12)) {
5576  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
5577  __Pyx_INCREF(__pyx_t_12);
5578  __Pyx_INCREF(function);
5579  __Pyx_DECREF_SET(__pyx_t_11, function);
5580  }
5581  }
5582  if (__pyx_t_12) {
5583  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 436, __pyx_L1_error)
5584  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5585  } else {
5586  __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 436, __pyx_L1_error)
5587  }
5588  __Pyx_GOTREF(__pyx_t_9);
5589  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5590  __pyx_t_11 = NULL;
5591  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5592  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
5593  if (likely(__pyx_t_11)) {
5594  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5595  __Pyx_INCREF(__pyx_t_11);
5596  __Pyx_INCREF(function);
5597  __Pyx_DECREF_SET(__pyx_t_2, function);
5598  }
5599  }
5600  if (!__pyx_t_11) {
5601  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5602  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5603  __Pyx_GOTREF(__pyx_t_6);
5604  } else {
5605  #if CYTHON_FAST_PYCALL
5606  if (PyFunction_Check(__pyx_t_2)) {
5607  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
5608  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5609  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5610  __Pyx_GOTREF(__pyx_t_6);
5611  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5612  } else
5613  #endif
5614  #if CYTHON_FAST_PYCCALL
5615  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
5616  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
5617  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5618  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5619  __Pyx_GOTREF(__pyx_t_6);
5620  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5621  } else
5622  #endif
5623  {
5624  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L1_error)
5625  __Pyx_GOTREF(__pyx_t_12);
5626  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
5627  __Pyx_GIVEREF(__pyx_t_9);
5628  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_9);
5629  __pyx_t_9 = 0;
5630  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5631  __Pyx_GOTREF(__pyx_t_6);
5632  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5633  }
5634  }
5635  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5636  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
5637  __Pyx_GOTREF(__pyx_t_2);
5638  __Pyx_GIVEREF(__pyx_t_6);
5639  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
5640  __pyx_t_6 = 0;
5641  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_VOF_max_numDiff_e, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
5642  __Pyx_GOTREF(__pyx_t_6);
5643  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5644  __pyx_t_2 = NULL;
5645  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
5646  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
5647  if (likely(__pyx_t_2)) {
5648  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
5649  __Pyx_INCREF(__pyx_t_2);
5650  __Pyx_INCREF(function);
5651  __Pyx_DECREF_SET(__pyx_t_1, function);
5652  }
5653  }
5654  if (!__pyx_t_2) {
5655  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5656  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5657  __Pyx_GOTREF(__pyx_t_7);
5658  } else {
5659  #if CYTHON_FAST_PYCALL
5660  if (PyFunction_Check(__pyx_t_1)) {
5661  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
5662  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5663  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5664  __Pyx_GOTREF(__pyx_t_7);
5665  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5666  } else
5667  #endif
5668  #if CYTHON_FAST_PYCCALL
5669  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
5670  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
5671  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5672  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5673  __Pyx_GOTREF(__pyx_t_7);
5674  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5675  } else
5676  #endif
5677  {
5678  __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L1_error)
5679  __Pyx_GOTREF(__pyx_t_12);
5680  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
5681  __Pyx_GIVEREF(__pyx_t_6);
5682  PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_6);
5683  __pyx_t_6 = 0;
5684  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
5685  __Pyx_GOTREF(__pyx_t_7);
5686  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
5687  }
5688  }
5689  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5690  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5691 
5692  /* "ADR.pyx":425
5693  * self.numDiff.append(cq[('numDiff',ci,ci)])
5694  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5695  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
5696  * self.nSteps += 1
5697  * if self.lag:
5698  */
5699 
5700  /* function exit code */
5701  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5702  goto __pyx_L0;
5703  __pyx_L1_error:;
5704  __Pyx_XDECREF(__pyx_t_1);
5705  __Pyx_XDECREF(__pyx_t_2);
5706  __Pyx_XDECREF(__pyx_t_6);
5707  __Pyx_XDECREF(__pyx_t_7);
5708  __Pyx_XDECREF(__pyx_t_9);
5709  __Pyx_XDECREF(__pyx_t_11);
5710  __Pyx_XDECREF(__pyx_t_12);
5711  __Pyx_AddTraceback("ADR.ShockCapturing.updateShockCapturingHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
5712  __pyx_r = NULL;
5713  __pyx_L0:;
5714  __Pyx_XDECREF(__pyx_v_ci);
5715  __Pyx_XGIVEREF(__pyx_r);
5716  __Pyx_RefNannyFinishContext();
5717  return __pyx_r;
5718 }
5719 
5720 /* "ADR.pyx":439
5721  *
5722  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5723  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5724  * getAdvectiveFluxBoundaryConditions,
5725  * getDiffusiveFluxBoundaryConditions):
5726  */
5727 
5728 /* Python wrapper */
5729 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5730 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
5731 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5732  PyObject *__pyx_v_self = 0;
5733  PyObject *__pyx_v_vt = 0;
5734  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
5735  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
5736  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
5737  PyObject *__pyx_r = 0;
5738  __Pyx_RefNannyDeclarations
5739  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5740  {
5741  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
5742  PyObject* values[5] = {0,0,0,0,0};
5743  if (unlikely(__pyx_kwds)) {
5744  Py_ssize_t kw_args;
5745  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5746  switch (pos_args) {
5747  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5748  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5749  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5750  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5751  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5752  case 0: break;
5753  default: goto __pyx_L5_argtuple_error;
5754  }
5755  kw_args = PyDict_Size(__pyx_kwds);
5756  switch (pos_args) {
5757  case 0:
5758  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5759  else goto __pyx_L5_argtuple_error;
5760  case 1:
5761  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
5762  else {
5763  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 439, __pyx_L3_error)
5764  }
5765  case 2:
5766  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
5767  else {
5768  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 439, __pyx_L3_error)
5769  }
5770  case 3:
5771  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
5772  else {
5773  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 439, __pyx_L3_error)
5774  }
5775  case 4:
5776  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
5777  else {
5778  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 439, __pyx_L3_error)
5779  }
5780  }
5781  if (unlikely(kw_args > 0)) {
5782  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 439, __pyx_L3_error)
5783  }
5784  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5785  goto __pyx_L5_argtuple_error;
5786  } else {
5787  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5788  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5789  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5790  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5791  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5792  }
5793  __pyx_v_self = values[0];
5794  __pyx_v_vt = values[1];
5795  __pyx_v_getPointwiseBoundaryConditions = values[2];
5796  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
5797  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
5798  }
5799  goto __pyx_L4_argument_unpacking_done;
5800  __pyx_L5_argtuple_error:;
5801  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 439, __pyx_L3_error)
5802  __pyx_L3_error:;
5803  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5804  __Pyx_RefNannyFinishContext();
5805  return NULL;
5806  __pyx_L4_argument_unpacking_done:;
5807  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_IIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
5808 
5809  /* function exit code */
5810  __Pyx_RefNannyFinishContext();
5811  return __pyx_r;
5812 }
5813 
5814 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
5815  PyObject *__pyx_r = NULL;
5816  __Pyx_RefNannyDeclarations
5817  PyObject *__pyx_t_1 = NULL;
5818  PyObject *__pyx_t_2 = NULL;
5819  PyObject *__pyx_t_3 = NULL;
5820  int __pyx_t_4;
5821  PyObject *__pyx_t_5 = NULL;
5822  __Pyx_RefNannySetupContext("__init__", 0);
5823 
5824  /* "ADR.pyx":442
5825  * getAdvectiveFluxBoundaryConditions,
5826  * getDiffusiveFluxBoundaryConditions):
5827  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5828  * getAdvectiveFluxBoundaryConditions,
5829  * getDiffusiveFluxBoundaryConditions)
5830  */
5831  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
5832  __Pyx_GOTREF(__pyx_t_2);
5833  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
5834  __Pyx_GOTREF(__pyx_t_3);
5835  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5836  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
5837  __Pyx_GOTREF(__pyx_t_2);
5838  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5839  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
5840  __Pyx_GOTREF(__pyx_t_3);
5841  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5842 
5843  /* "ADR.pyx":444
5844  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
5845  * getAdvectiveFluxBoundaryConditions,
5846  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
5847  *
5848  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
5849  */
5850  __pyx_t_2 = NULL;
5851  __pyx_t_4 = 0;
5852  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
5853  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
5854  if (likely(__pyx_t_2)) {
5855  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5856  __Pyx_INCREF(__pyx_t_2);
5857  __Pyx_INCREF(function);
5858  __Pyx_DECREF_SET(__pyx_t_3, function);
5859  __pyx_t_4 = 1;
5860  }
5861  }
5862  #if CYTHON_FAST_PYCALL
5863  if (PyFunction_Check(__pyx_t_3)) {
5864  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
5865  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5866  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5867  __Pyx_GOTREF(__pyx_t_1);
5868  } else
5869  #endif
5870  #if CYTHON_FAST_PYCCALL
5871  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5872  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
5873  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5874  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5875  __Pyx_GOTREF(__pyx_t_1);
5876  } else
5877  #endif
5878  {
5879  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
5880  __Pyx_GOTREF(__pyx_t_5);
5881  if (__pyx_t_2) {
5882  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
5883  }
5884  __Pyx_INCREF(__pyx_v_self);
5885  __Pyx_GIVEREF(__pyx_v_self);
5886  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
5887  __Pyx_INCREF(__pyx_v_vt);
5888  __Pyx_GIVEREF(__pyx_v_vt);
5889  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
5890  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
5891  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
5892  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
5893  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
5894  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
5895  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
5896  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
5897  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
5898  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
5899  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
5900  __Pyx_GOTREF(__pyx_t_1);
5901  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5902  }
5903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5905 
5906  /* "ADR.pyx":439
5907  *
5908  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
5909  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5910  * getAdvectiveFluxBoundaryConditions,
5911  * getDiffusiveFluxBoundaryConditions):
5912  */
5913 
5914  /* function exit code */
5915  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5916  goto __pyx_L0;
5917  __pyx_L1_error:;
5918  __Pyx_XDECREF(__pyx_t_1);
5919  __Pyx_XDECREF(__pyx_t_2);
5920  __Pyx_XDECREF(__pyx_t_3);
5921  __Pyx_XDECREF(__pyx_t_5);
5922  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5923  __pyx_r = NULL;
5924  __pyx_L0:;
5925  __Pyx_XGIVEREF(__pyx_r);
5926  __Pyx_RefNannyFinishContext();
5927  return __pyx_r;
5928 }
5929 
5930 /* "ADR.pyx":447
5931  *
5932  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
5933  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
5934  * getAdvectiveFluxBoundaryConditions,
5935  * getDiffusiveFluxBoundaryConditions):
5936  */
5937 
5938 /* Python wrapper */
5939 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5940 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
5941 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5942  PyObject *__pyx_v_self = 0;
5943  PyObject *__pyx_v_vt = 0;
5944  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
5945  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
5946  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
5947  PyObject *__pyx_r = 0;
5948  __Pyx_RefNannyDeclarations
5949  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5950  {
5951  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
5952  PyObject* values[5] = {0,0,0,0,0};
5953  if (unlikely(__pyx_kwds)) {
5954  Py_ssize_t kw_args;
5955  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5956  switch (pos_args) {
5957  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5958  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5959  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5960  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5961  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5962  case 0: break;
5963  default: goto __pyx_L5_argtuple_error;
5964  }
5965  kw_args = PyDict_Size(__pyx_kwds);
5966  switch (pos_args) {
5967  case 0:
5968  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5969  else goto __pyx_L5_argtuple_error;
5970  case 1:
5971  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
5972  else {
5973  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 447, __pyx_L3_error)
5974  }
5975  case 2:
5976  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
5977  else {
5978  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 447, __pyx_L3_error)
5979  }
5980  case 3:
5981  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
5982  else {
5983  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 447, __pyx_L3_error)
5984  }
5985  case 4:
5986  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
5987  else {
5988  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 447, __pyx_L3_error)
5989  }
5990  }
5991  if (unlikely(kw_args > 0)) {
5992  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 447, __pyx_L3_error)
5993  }
5994  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
5995  goto __pyx_L5_argtuple_error;
5996  } else {
5997  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5998  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5999  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6000  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6001  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6002  }
6003  __pyx_v_self = values[0];
6004  __pyx_v_vt = values[1];
6005  __pyx_v_getPointwiseBoundaryConditions = values[2];
6006  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6007  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6008  }
6009  goto __pyx_L4_argument_unpacking_done;
6010  __pyx_L5_argtuple_error:;
6011  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 447, __pyx_L3_error)
6012  __pyx_L3_error:;
6013  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6014  __Pyx_RefNannyFinishContext();
6015  return NULL;
6016  __pyx_L4_argument_unpacking_done:;
6017  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_SIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6018 
6019  /* function exit code */
6020  __Pyx_RefNannyFinishContext();
6021  return __pyx_r;
6022 }
6023 
6024 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6025  PyObject *__pyx_r = NULL;
6026  __Pyx_RefNannyDeclarations
6027  PyObject *__pyx_t_1 = NULL;
6028  PyObject *__pyx_t_2 = NULL;
6029  PyObject *__pyx_t_3 = NULL;
6030  int __pyx_t_4;
6031  PyObject *__pyx_t_5 = NULL;
6032  __Pyx_RefNannySetupContext("__init__", 0);
6033 
6034  /* "ADR.pyx":450
6035  * getAdvectiveFluxBoundaryConditions,
6036  * getDiffusiveFluxBoundaryConditions):
6037  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6038  * getAdvectiveFluxBoundaryConditions,
6039  * getDiffusiveFluxBoundaryConditions)
6040  */
6041  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
6042  __Pyx_GOTREF(__pyx_t_2);
6043  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
6044  __Pyx_GOTREF(__pyx_t_3);
6045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6046  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
6047  __Pyx_GOTREF(__pyx_t_2);
6048  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6049  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
6050  __Pyx_GOTREF(__pyx_t_3);
6051  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6052 
6053  /* "ADR.pyx":452
6054  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6055  * getAdvectiveFluxBoundaryConditions,
6056  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6057  *
6058  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6059  */
6060  __pyx_t_2 = NULL;
6061  __pyx_t_4 = 0;
6062  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6063  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6064  if (likely(__pyx_t_2)) {
6065  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6066  __Pyx_INCREF(__pyx_t_2);
6067  __Pyx_INCREF(function);
6068  __Pyx_DECREF_SET(__pyx_t_3, function);
6069  __pyx_t_4 = 1;
6070  }
6071  }
6072  #if CYTHON_FAST_PYCALL
6073  if (PyFunction_Check(__pyx_t_3)) {
6074  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6075  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6076  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6077  __Pyx_GOTREF(__pyx_t_1);
6078  } else
6079  #endif
6080  #if CYTHON_FAST_PYCCALL
6081  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6082  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6083  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6084  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6085  __Pyx_GOTREF(__pyx_t_1);
6086  } else
6087  #endif
6088  {
6089  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error)
6090  __Pyx_GOTREF(__pyx_t_5);
6091  if (__pyx_t_2) {
6092  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6093  }
6094  __Pyx_INCREF(__pyx_v_self);
6095  __Pyx_GIVEREF(__pyx_v_self);
6096  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6097  __Pyx_INCREF(__pyx_v_vt);
6098  __Pyx_GIVEREF(__pyx_v_vt);
6099  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6100  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6101  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6102  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6103  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6104  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6105  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6106  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6107  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6108  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6109  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
6110  __Pyx_GOTREF(__pyx_t_1);
6111  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6112  }
6113  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6115 
6116  /* "ADR.pyx":447
6117  *
6118  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
6119  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6120  * getAdvectiveFluxBoundaryConditions,
6121  * getDiffusiveFluxBoundaryConditions):
6122  */
6123 
6124  /* function exit code */
6125  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6126  goto __pyx_L0;
6127  __pyx_L1_error:;
6128  __Pyx_XDECREF(__pyx_t_1);
6129  __Pyx_XDECREF(__pyx_t_2);
6130  __Pyx_XDECREF(__pyx_t_3);
6131  __Pyx_XDECREF(__pyx_t_5);
6132  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6133  __pyx_r = NULL;
6134  __pyx_L0:;
6135  __Pyx_XGIVEREF(__pyx_r);
6136  __Pyx_RefNannyFinishContext();
6137  return __pyx_r;
6138 }
6139 
6140 /* "ADR.pyx":455
6141  *
6142  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6143  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6144  * getAdvectiveFluxBoundaryConditions,
6145  * getDiffusiveFluxBoundaryConditions):
6146  */
6147 
6148 /* Python wrapper */
6149 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6150 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6151 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6152  PyObject *__pyx_v_self = 0;
6153  PyObject *__pyx_v_vt = 0;
6154  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
6155  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
6156  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
6157  PyObject *__pyx_r = 0;
6158  __Pyx_RefNannyDeclarations
6159  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6160  {
6161  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
6162  PyObject* values[5] = {0,0,0,0,0};
6163  if (unlikely(__pyx_kwds)) {
6164  Py_ssize_t kw_args;
6165  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6166  switch (pos_args) {
6167  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6168  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6169  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6170  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6171  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6172  case 0: break;
6173  default: goto __pyx_L5_argtuple_error;
6174  }
6175  kw_args = PyDict_Size(__pyx_kwds);
6176  switch (pos_args) {
6177  case 0:
6178  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6179  else goto __pyx_L5_argtuple_error;
6180  case 1:
6181  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
6182  else {
6183  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 455, __pyx_L3_error)
6184  }
6185  case 2:
6186  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
6187  else {
6188  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 455, __pyx_L3_error)
6189  }
6190  case 3:
6191  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
6192  else {
6193  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 455, __pyx_L3_error)
6194  }
6195  case 4:
6196  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
6197  else {
6198  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 455, __pyx_L3_error)
6199  }
6200  }
6201  if (unlikely(kw_args > 0)) {
6202  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 455, __pyx_L3_error)
6203  }
6204  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6205  goto __pyx_L5_argtuple_error;
6206  } else {
6207  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6208  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6209  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6210  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6211  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6212  }
6213  __pyx_v_self = values[0];
6214  __pyx_v_vt = values[1];
6215  __pyx_v_getPointwiseBoundaryConditions = values[2];
6216  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6217  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6218  }
6219  goto __pyx_L4_argument_unpacking_done;
6220  __pyx_L5_argtuple_error:;
6221  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 455, __pyx_L3_error)
6222  __pyx_L3_error:;
6223  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6224  __Pyx_RefNannyFinishContext();
6225  return NULL;
6226  __pyx_L4_argument_unpacking_done:;
6227  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_NIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6228 
6229  /* function exit code */
6230  __Pyx_RefNannyFinishContext();
6231  return __pyx_r;
6232 }
6233 
6234 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6235  PyObject *__pyx_r = NULL;
6236  __Pyx_RefNannyDeclarations
6237  PyObject *__pyx_t_1 = NULL;
6238  PyObject *__pyx_t_2 = NULL;
6239  PyObject *__pyx_t_3 = NULL;
6240  int __pyx_t_4;
6241  PyObject *__pyx_t_5 = NULL;
6242  __Pyx_RefNannySetupContext("__init__", 0);
6243 
6244  /* "ADR.pyx":458
6245  * getAdvectiveFluxBoundaryConditions,
6246  * getDiffusiveFluxBoundaryConditions):
6247  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6248  * getAdvectiveFluxBoundaryConditions,
6249  * getDiffusiveFluxBoundaryConditions)
6250  */
6251  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
6252  __Pyx_GOTREF(__pyx_t_2);
6253  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
6254  __Pyx_GOTREF(__pyx_t_3);
6255  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6256  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
6257  __Pyx_GOTREF(__pyx_t_2);
6258  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6259  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
6260  __Pyx_GOTREF(__pyx_t_3);
6261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6262 
6263  /* "ADR.pyx":460
6264  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6265  * getAdvectiveFluxBoundaryConditions,
6266  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6267  *
6268  * NumericalFlux = NumericalFlux_SIPG
6269  */
6270  __pyx_t_2 = NULL;
6271  __pyx_t_4 = 0;
6272  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6273  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6274  if (likely(__pyx_t_2)) {
6275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6276  __Pyx_INCREF(__pyx_t_2);
6277  __Pyx_INCREF(function);
6278  __Pyx_DECREF_SET(__pyx_t_3, function);
6279  __pyx_t_4 = 1;
6280  }
6281  }
6282  #if CYTHON_FAST_PYCALL
6283  if (PyFunction_Check(__pyx_t_3)) {
6284  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6285  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6286  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6287  __Pyx_GOTREF(__pyx_t_1);
6288  } else
6289  #endif
6290  #if CYTHON_FAST_PYCCALL
6291  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6292  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6293  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6294  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6295  __Pyx_GOTREF(__pyx_t_1);
6296  } else
6297  #endif
6298  {
6299  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error)
6300  __Pyx_GOTREF(__pyx_t_5);
6301  if (__pyx_t_2) {
6302  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6303  }
6304  __Pyx_INCREF(__pyx_v_self);
6305  __Pyx_GIVEREF(__pyx_v_self);
6306  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6307  __Pyx_INCREF(__pyx_v_vt);
6308  __Pyx_GIVEREF(__pyx_v_vt);
6309  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6310  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6311  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6312  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6313  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6314  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6315  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6316  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6317  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6318  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6319  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
6320  __Pyx_GOTREF(__pyx_t_1);
6321  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6322  }
6323  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6324  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6325 
6326  /* "ADR.pyx":455
6327  *
6328  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6329  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6330  * getAdvectiveFluxBoundaryConditions,
6331  * getDiffusiveFluxBoundaryConditions):
6332  */
6333 
6334  /* function exit code */
6335  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6336  goto __pyx_L0;
6337  __pyx_L1_error:;
6338  __Pyx_XDECREF(__pyx_t_1);
6339  __Pyx_XDECREF(__pyx_t_2);
6340  __Pyx_XDECREF(__pyx_t_3);
6341  __Pyx_XDECREF(__pyx_t_5);
6342  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6343  __pyx_r = NULL;
6344  __pyx_L0:;
6345  __Pyx_XGIVEREF(__pyx_r);
6346  __Pyx_RefNannyFinishContext();
6347  return __pyx_r;
6348 }
6349 
6350 /* "ADR.pyx":472
6351  * """
6352  * from proteus.ctransportCoefficients import L2projectEvaluate
6353  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
6354  * timeVaryingCoefficients=False,
6355  * forceStrongDirichlet=False,
6356  */
6357 
6358 /* Python wrapper */
6359 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6360 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_12Coefficients_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6361 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6362  PyObject *__pyx_v_self = 0;
6363  PyObject *__pyx_v_aOfX = 0;
6364  PyObject *__pyx_v_fOfX = 0;
6365  PyObject *__pyx_v_velocity = 0;
6366  PyObject *__pyx_v_nc = 0;
6367  PyObject *__pyx_v_nd = 0;
6368  PyObject *__pyx_v_l2proj = 0;
6369  PyObject *__pyx_v_timeVaryingCoefficients = 0;
6370  PyObject *__pyx_v_forceStrongDirichlet = 0;
6371  PyObject *__pyx_v_useMetrics = 0;
6372  PyObject *__pyx_v_sc_uref = 0;
6373  PyObject *__pyx_v_sc_beta = 0;
6374  PyObject *__pyx_r = 0;
6375  __Pyx_RefNannyDeclarations
6376  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6377  {
6378  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_aOfX,&__pyx_n_s_fOfX,&__pyx_n_s_velocity,&__pyx_n_s_nc,&__pyx_n_s_nd,&__pyx_n_s_l2proj,&__pyx_n_s_timeVaryingCoefficients,&__pyx_n_s_forceStrongDirichlet,&__pyx_n_s_useMetrics,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_beta,0};
6379  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
6380  values[3] = ((PyObject *)((PyObject *)Py_None));
6381  values[4] = ((PyObject *)((PyObject *)__pyx_int_1));
6382  values[5] = ((PyObject *)((PyObject *)__pyx_int_2));
6383  values[6] = ((PyObject *)((PyObject *)Py_None));
6384 
6385  /* "ADR.pyx":473
6386  * from proteus.ctransportCoefficients import L2projectEvaluate
6387  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6388  * timeVaryingCoefficients=False, # <<<<<<<<<<<<<<
6389  * forceStrongDirichlet=False,
6390  * useMetrics=0.0,
6391  */
6392  values[7] = ((PyObject *)((PyObject *)Py_False));
6393 
6394  /* "ADR.pyx":474
6395  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6396  * timeVaryingCoefficients=False,
6397  * forceStrongDirichlet=False, # <<<<<<<<<<<<<<
6398  * useMetrics=0.0,
6399  * sc_uref=1.0,
6400  */
6401  values[8] = ((PyObject *)((PyObject *)Py_False));
6402  values[9] = ((PyObject *)((PyObject*)__pyx_float_0_0));
6403  values[10] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6404  values[11] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6405  if (unlikely(__pyx_kwds)) {
6406  Py_ssize_t kw_args;
6407  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6408  switch (pos_args) {
6409  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6410  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6411  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6412  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6413  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6414  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6415  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6416  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6417  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6418  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6419  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6420  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6421  case 0: break;
6422  default: goto __pyx_L5_argtuple_error;
6423  }
6424  kw_args = PyDict_Size(__pyx_kwds);
6425  switch (pos_args) {
6426  case 0:
6427  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6428  else goto __pyx_L5_argtuple_error;
6429  case 1:
6430  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_aOfX)) != 0)) kw_args--;
6431  else {
6432  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 1); __PYX_ERR(0, 472, __pyx_L3_error)
6433  }
6434  case 2:
6435  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fOfX)) != 0)) kw_args--;
6436  else {
6437  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 2); __PYX_ERR(0, 472, __pyx_L3_error)
6438  }
6439  case 3:
6440  if (kw_args > 0) {
6441  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_velocity);
6442  if (value) { values[3] = value; kw_args--; }
6443  }
6444  case 4:
6445  if (kw_args > 0) {
6446  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nc);
6447  if (value) { values[4] = value; kw_args--; }
6448  }
6449  case 5:
6450  if (kw_args > 0) {
6451  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nd);
6452  if (value) { values[5] = value; kw_args--; }
6453  }
6454  case 6:
6455  if (kw_args > 0) {
6456  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l2proj);
6457  if (value) { values[6] = value; kw_args--; }
6458  }
6459  case 7:
6460  if (kw_args > 0) {
6461  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeVaryingCoefficients);
6462  if (value) { values[7] = value; kw_args--; }
6463  }
6464  case 8:
6465  if (kw_args > 0) {
6466  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_forceStrongDirichlet);
6467  if (value) { values[8] = value; kw_args--; }
6468  }
6469  case 9:
6470  if (kw_args > 0) {
6471  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_useMetrics);
6472  if (value) { values[9] = value; kw_args--; }
6473  }
6474  case 10:
6475  if (kw_args > 0) {
6476  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_uref);
6477  if (value) { values[10] = value; kw_args--; }
6478  }
6479  case 11:
6480  if (kw_args > 0) {
6481  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sc_beta);
6482  if (value) { values[11] = value; kw_args--; }
6483  }
6484  }
6485  if (unlikely(kw_args > 0)) {
6486  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 472, __pyx_L3_error)
6487  }
6488  } else {
6489  switch (PyTuple_GET_SIZE(__pyx_args)) {
6490  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6491  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6492  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6493  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6494  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6495  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6496  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6497  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6498  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6499  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6500  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6501  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6502  break;
6503  default: goto __pyx_L5_argtuple_error;
6504  }
6505  }
6506  __pyx_v_self = values[0];
6507  __pyx_v_aOfX = values[1];
6508  __pyx_v_fOfX = values[2];
6509  __pyx_v_velocity = values[3];
6510  __pyx_v_nc = values[4];
6511  __pyx_v_nd = values[5];
6512  __pyx_v_l2proj = values[6];
6513  __pyx_v_timeVaryingCoefficients = values[7];
6514  __pyx_v_forceStrongDirichlet = values[8];
6515  __pyx_v_useMetrics = values[9];
6516  __pyx_v_sc_uref = values[10];
6517  __pyx_v_sc_beta = values[11];
6518  }
6519  goto __pyx_L4_argument_unpacking_done;
6520  __pyx_L5_argtuple_error:;
6521  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 472, __pyx_L3_error)
6522  __pyx_L3_error:;
6523  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6524  __Pyx_RefNannyFinishContext();
6525  return NULL;
6526  __pyx_L4_argument_unpacking_done:;
6527  __pyx_r = __pyx_pf_3ADR_12Coefficients___init__(__pyx_self, __pyx_v_self, __pyx_v_aOfX, __pyx_v_fOfX, __pyx_v_velocity, __pyx_v_nc, __pyx_v_nd, __pyx_v_l2proj, __pyx_v_timeVaryingCoefficients, __pyx_v_forceStrongDirichlet, __pyx_v_useMetrics, __pyx_v_sc_uref, __pyx_v_sc_beta);
6528 
6529  /* "ADR.pyx":472
6530  * """
6531  * from proteus.ctransportCoefficients import L2projectEvaluate
6532  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
6533  * timeVaryingCoefficients=False,
6534  * forceStrongDirichlet=False,
6535  */
6536 
6537  /* function exit code */
6538  __Pyx_RefNannyFinishContext();
6539  return __pyx_r;
6540 }
6541 
6542 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta) {
6543  PyObject *__pyx_v_mass = NULL;
6544  PyObject *__pyx_v_advection = NULL;
6545  PyObject *__pyx_v_diffusion = NULL;
6546  PyObject *__pyx_v_potential = NULL;
6547  PyObject *__pyx_v_reaction = NULL;
6548  PyObject *__pyx_v_hamiltonian = NULL;
6549  PyObject *__pyx_v_i = NULL;
6550  PyObject *__pyx_v_sdInfo = NULL;
6551  CYTHON_UNUSED PyObject *__pyx_v_row = NULL;
6552  PyObject *__pyx_r = NULL;
6553  __Pyx_RefNannyDeclarations
6554  PyObject *__pyx_t_1 = NULL;
6555  PyObject *__pyx_t_2 = NULL;
6556  Py_ssize_t __pyx_t_3;
6557  PyObject *(*__pyx_t_4)(PyObject *);
6558  PyObject *__pyx_t_5 = NULL;
6559  PyObject *__pyx_t_6 = NULL;
6560  PyObject *__pyx_t_7 = NULL;
6561  PyObject *__pyx_t_8 = NULL;
6562  PyObject *__pyx_t_9 = NULL;
6563  __Pyx_RefNannySetupContext("__init__", 0);
6564 
6565  /* "ADR.pyx":478
6566  * sc_uref=1.0,
6567  * sc_beta=1.0):
6568  * self.useMetrics = useMetrics # <<<<<<<<<<<<<<
6569  * self.forceStrongDirichlet=forceStrongDirichlet
6570  * self.aOfX = aOfX
6571  */
6572  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_useMetrics, __pyx_v_useMetrics) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
6573 
6574  /* "ADR.pyx":479
6575  * sc_beta=1.0):
6576  * self.useMetrics = useMetrics
6577  * self.forceStrongDirichlet=forceStrongDirichlet # <<<<<<<<<<<<<<
6578  * self.aOfX = aOfX
6579  * self.fOfX = fOfX
6580  */
6581  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongDirichlet, __pyx_v_forceStrongDirichlet) < 0) __PYX_ERR(0, 479, __pyx_L1_error)
6582 
6583  /* "ADR.pyx":480
6584  * self.useMetrics = useMetrics
6585  * self.forceStrongDirichlet=forceStrongDirichlet
6586  * self.aOfX = aOfX # <<<<<<<<<<<<<<
6587  * self.fOfX = fOfX
6588  * self.velocity=velocity
6589  */
6590  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aOfX, __pyx_v_aOfX) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
6591 
6592  /* "ADR.pyx":481
6593  * self.forceStrongDirichlet=forceStrongDirichlet
6594  * self.aOfX = aOfX
6595  * self.fOfX = fOfX # <<<<<<<<<<<<<<
6596  * self.velocity=velocity
6597  * self.nd = nd
6598  */
6599  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fOfX, __pyx_v_fOfX) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
6600 
6601  /* "ADR.pyx":482
6602  * self.aOfX = aOfX
6603  * self.fOfX = fOfX
6604  * self.velocity=velocity # <<<<<<<<<<<<<<
6605  * self.nd = nd
6606  * self.l2proj = l2proj
6607  */
6608  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocity, __pyx_v_velocity) < 0) __PYX_ERR(0, 482, __pyx_L1_error)
6609 
6610  /* "ADR.pyx":483
6611  * self.fOfX = fOfX
6612  * self.velocity=velocity
6613  * self.nd = nd # <<<<<<<<<<<<<<
6614  * self.l2proj = l2proj
6615  * self.timeVaryingCoefficients=timeVaryingCoefficients
6616  */
6617  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nd, __pyx_v_nd) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
6618 
6619  /* "ADR.pyx":484
6620  * self.velocity=velocity
6621  * self.nd = nd
6622  * self.l2proj = l2proj # <<<<<<<<<<<<<<
6623  * self.timeVaryingCoefficients=timeVaryingCoefficients
6624  * self.sc_uref=sc_uref
6625  */
6626  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_l2proj, __pyx_v_l2proj) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
6627 
6628  /* "ADR.pyx":485
6629  * self.nd = nd
6630  * self.l2proj = l2proj
6631  * self.timeVaryingCoefficients=timeVaryingCoefficients # <<<<<<<<<<<<<<
6632  * self.sc_uref=sc_uref
6633  * self.sc_beta=sc_beta
6634  */
6635  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients, __pyx_v_timeVaryingCoefficients) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
6636 
6637  /* "ADR.pyx":486
6638  * self.l2proj = l2proj
6639  * self.timeVaryingCoefficients=timeVaryingCoefficients
6640  * self.sc_uref=sc_uref # <<<<<<<<<<<<<<
6641  * self.sc_beta=sc_beta
6642  * mass = {}
6643  */
6644  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_uref, __pyx_v_sc_uref) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
6645 
6646  /* "ADR.pyx":487
6647  * self.timeVaryingCoefficients=timeVaryingCoefficients
6648  * self.sc_uref=sc_uref
6649  * self.sc_beta=sc_beta # <<<<<<<<<<<<<<
6650  * mass = {}
6651  * advection = {}
6652  */
6653  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_beta, __pyx_v_sc_beta) < 0) __PYX_ERR(0, 487, __pyx_L1_error)
6654 
6655  /* "ADR.pyx":488
6656  * self.sc_uref=sc_uref
6657  * self.sc_beta=sc_beta
6658  * mass = {} # <<<<<<<<<<<<<<
6659  * advection = {}
6660  * diffusion = {}
6661  */
6662  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
6663  __Pyx_GOTREF(__pyx_t_1);
6664  __pyx_v_mass = ((PyObject*)__pyx_t_1);
6665  __pyx_t_1 = 0;
6666 
6667  /* "ADR.pyx":489
6668  * self.sc_beta=sc_beta
6669  * mass = {}
6670  * advection = {} # <<<<<<<<<<<<<<
6671  * diffusion = {}
6672  * potential = {}
6673  */
6674  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
6675  __Pyx_GOTREF(__pyx_t_1);
6676  __pyx_v_advection = ((PyObject*)__pyx_t_1);
6677  __pyx_t_1 = 0;
6678 
6679  /* "ADR.pyx":490
6680  * mass = {}
6681  * advection = {}
6682  * diffusion = {} # <<<<<<<<<<<<<<
6683  * potential = {}
6684  * reaction = {}
6685  */
6686  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
6687  __Pyx_GOTREF(__pyx_t_1);
6688  __pyx_v_diffusion = ((PyObject*)__pyx_t_1);
6689  __pyx_t_1 = 0;
6690 
6691  /* "ADR.pyx":491
6692  * advection = {}
6693  * diffusion = {}
6694  * potential = {} # <<<<<<<<<<<<<<
6695  * reaction = {}
6696  * hamiltonian = {}
6697  */
6698  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
6699  __Pyx_GOTREF(__pyx_t_1);
6700  __pyx_v_potential = ((PyObject*)__pyx_t_1);
6701  __pyx_t_1 = 0;
6702 
6703  /* "ADR.pyx":492
6704  * diffusion = {}
6705  * potential = {}
6706  * reaction = {} # <<<<<<<<<<<<<<
6707  * hamiltonian = {}
6708  * for i in range(nc):
6709  */
6710  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
6711  __Pyx_GOTREF(__pyx_t_1);
6712  __pyx_v_reaction = ((PyObject*)__pyx_t_1);
6713  __pyx_t_1 = 0;
6714 
6715  /* "ADR.pyx":493
6716  * potential = {}
6717  * reaction = {}
6718  * hamiltonian = {} # <<<<<<<<<<<<<<
6719  * for i in range(nc):
6720  * diffusion[i] = {i : {i:'constant'}}
6721  */
6722  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
6723  __Pyx_GOTREF(__pyx_t_1);
6724  __pyx_v_hamiltonian = ((PyObject*)__pyx_t_1);
6725  __pyx_t_1 = 0;
6726 
6727  /* "ADR.pyx":494
6728  * reaction = {}
6729  * hamiltonian = {}
6730  * for i in range(nc): # <<<<<<<<<<<<<<
6731  * diffusion[i] = {i : {i:'constant'}}
6732  * reaction[i] = {i : 'constant'}
6733  */
6734  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
6735  __Pyx_GOTREF(__pyx_t_1);
6736  __Pyx_INCREF(__pyx_v_nc);
6737  __Pyx_GIVEREF(__pyx_v_nc);
6738  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nc);
6739  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6740  __Pyx_GOTREF(__pyx_t_2);
6741  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6742  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
6743  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
6744  __pyx_t_4 = NULL;
6745  } else {
6746  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
6747  __Pyx_GOTREF(__pyx_t_1);
6748  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error)
6749  }
6750  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6751  for (;;) {
6752  if (likely(!__pyx_t_4)) {
6753  if (likely(PyList_CheckExact(__pyx_t_1))) {
6754  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
6755  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6756  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
6757  #else
6758  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6759  __Pyx_GOTREF(__pyx_t_2);
6760  #endif
6761  } else {
6762  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6763  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6764  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
6765  #else
6766  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
6767  __Pyx_GOTREF(__pyx_t_2);
6768  #endif
6769  }
6770  } else {
6771  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
6772  if (unlikely(!__pyx_t_2)) {
6773  PyObject* exc_type = PyErr_Occurred();
6774  if (exc_type) {
6775  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6776  else __PYX_ERR(0, 494, __pyx_L1_error)
6777  }
6778  break;
6779  }
6780  __Pyx_GOTREF(__pyx_t_2);
6781  }
6782  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
6783  __pyx_t_2 = 0;
6784 
6785  /* "ADR.pyx":495
6786  * hamiltonian = {}
6787  * for i in range(nc):
6788  * diffusion[i] = {i : {i:'constant'}} # <<<<<<<<<<<<<<
6789  * reaction[i] = {i : 'constant'}
6790  * advection[i] = {i : 'linear'} #now include for gravity type terms
6791  */
6792  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
6793  __Pyx_GOTREF(__pyx_t_2);
6794  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error)
6795  __Pyx_GOTREF(__pyx_t_5);
6796  if (PyDict_SetItem(__pyx_t_5, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
6797  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_t_5) < 0) __PYX_ERR(0, 495, __pyx_L1_error)
6798  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6799  if (unlikely(PyDict_SetItem(__pyx_v_diffusion, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 495, __pyx_L1_error)
6800  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6801 
6802  /* "ADR.pyx":496
6803  * for i in range(nc):
6804  * diffusion[i] = {i : {i:'constant'}}
6805  * reaction[i] = {i : 'constant'} # <<<<<<<<<<<<<<
6806  * advection[i] = {i : 'linear'} #now include for gravity type terms
6807  * potential[i] = {i : 'u'}
6808  */
6809  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
6810  __Pyx_GOTREF(__pyx_t_2);
6811  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
6812  if (unlikely(PyDict_SetItem(__pyx_v_reaction, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
6813  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6814 
6815  /* "ADR.pyx":497
6816  * diffusion[i] = {i : {i:'constant'}}
6817  * reaction[i] = {i : 'constant'}
6818  * advection[i] = {i : 'linear'} #now include for gravity type terms # <<<<<<<<<<<<<<
6819  * potential[i] = {i : 'u'}
6820  * #end i
6821  */
6822  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
6823  __Pyx_GOTREF(__pyx_t_2);
6824  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_linear) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
6825  if (unlikely(PyDict_SetItem(__pyx_v_advection, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 497, __pyx_L1_error)
6826  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6827 
6828  /* "ADR.pyx":498
6829  * reaction[i] = {i : 'constant'}
6830  * advection[i] = {i : 'linear'} #now include for gravity type terms
6831  * potential[i] = {i : 'u'} # <<<<<<<<<<<<<<
6832  * #end i
6833  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
6834  */
6835  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
6836  __Pyx_GOTREF(__pyx_t_2);
6837  if (PyDict_SetItem(__pyx_t_2, __pyx_v_i, __pyx_n_s_u) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
6838  if (unlikely(PyDict_SetItem(__pyx_v_potential, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 498, __pyx_L1_error)
6839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6840 
6841  /* "ADR.pyx":494
6842  * reaction = {}
6843  * hamiltonian = {}
6844  * for i in range(nc): # <<<<<<<<<<<<<<
6845  * diffusion[i] = {i : {i:'constant'}}
6846  * reaction[i] = {i : 'constant'}
6847  */
6848  }
6849  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6850 
6851  /* "ADR.pyx":500
6852  * potential[i] = {i : 'u'}
6853  * #end i
6854  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
6855  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
6856  * TC_base.__init__(self,
6857  */
6858  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
6859  __Pyx_GOTREF(__pyx_t_1);
6860  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6861  __Pyx_GOTREF(__pyx_t_2);
6862  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_arange); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
6863  __Pyx_GOTREF(__pyx_t_5);
6864  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6865  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6866  __Pyx_GOTREF(__pyx_t_2);
6867  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start, __pyx_int_0) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6868  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6869  __Pyx_GOTREF(__pyx_t_6);
6870  __pyx_t_7 = PyNumber_Power(__pyx_t_6, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
6871  __Pyx_GOTREF(__pyx_t_7);
6872  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6873  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6874  __Pyx_GOTREF(__pyx_t_6);
6875  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6876  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_stop, __pyx_t_6) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6877  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6878  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6879  __Pyx_GOTREF(__pyx_t_6);
6880  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_step, __pyx_t_6) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6881  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6882  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6883  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
6884  __Pyx_GOTREF(__pyx_t_6);
6885  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6886  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6887 
6888  /* "ADR.pyx":501
6889  * #end i
6890  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
6891  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))} # <<<<<<<<<<<<<<
6892  * TC_base.__init__(self,
6893  * nc,
6894  */
6895  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6896  __Pyx_GOTREF(__pyx_t_2);
6897  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
6898  __Pyx_GOTREF(__pyx_t_5);
6899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6900  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6901  __Pyx_GOTREF(__pyx_t_2);
6902  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6903  __Pyx_GOTREF(__pyx_t_7);
6904  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6905  __Pyx_GOTREF(__pyx_t_8);
6906  __Pyx_GIVEREF(__pyx_t_7);
6907  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
6908  __pyx_t_7 = 0;
6909  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6910  __Pyx_GOTREF(__pyx_t_7);
6911  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6912  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
6913  __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_3 = 0;
6914  __pyx_t_4 = NULL;
6915  } else {
6916  __pyx_t_3 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6917  __Pyx_GOTREF(__pyx_t_8);
6918  __pyx_t_4 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
6919  }
6920  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6921  for (;;) {
6922  if (likely(!__pyx_t_4)) {
6923  if (likely(PyList_CheckExact(__pyx_t_8))) {
6924  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_8)) break;
6925  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6926  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
6927  #else
6928  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6929  __Pyx_GOTREF(__pyx_t_7);
6930  #endif
6931  } else {
6932  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
6933  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6934  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
6935  #else
6936  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6937  __Pyx_GOTREF(__pyx_t_7);
6938  #endif
6939  }
6940  } else {
6941  __pyx_t_7 = __pyx_t_4(__pyx_t_8);
6942  if (unlikely(!__pyx_t_7)) {
6943  PyObject* exc_type = PyErr_Occurred();
6944  if (exc_type) {
6945  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6946  else __PYX_ERR(0, 501, __pyx_L1_error)
6947  }
6948  break;
6949  }
6950  __Pyx_GOTREF(__pyx_t_7);
6951  }
6952  __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
6953  __pyx_t_7 = 0;
6954  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6955  __Pyx_GOTREF(__pyx_t_7);
6956  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error)
6957  __Pyx_GOTREF(__pyx_t_9);
6958  __Pyx_GIVEREF(__pyx_t_7);
6959  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
6960  __pyx_t_7 = 0;
6961  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6962  __Pyx_GOTREF(__pyx_t_7);
6963  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6964  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 501, __pyx_L1_error)
6965  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6966  }
6967  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6968  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
6969  __Pyx_GOTREF(__pyx_t_8);
6970  __Pyx_GIVEREF(__pyx_t_2);
6971  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
6972  __pyx_t_2 = 0;
6973  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
6974  __Pyx_GOTREF(__pyx_t_2);
6975  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
6976  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
6977  __Pyx_GOTREF(__pyx_t_7);
6978  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6979  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6981 
6982  /* "ADR.pyx":500
6983  * potential[i] = {i : 'u'}
6984  * #end i
6985  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
6986  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
6987  * TC_base.__init__(self,
6988  */
6989  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
6990  __Pyx_GOTREF(__pyx_t_2);
6991  __Pyx_GIVEREF(__pyx_t_6);
6992  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
6993  __Pyx_GIVEREF(__pyx_t_7);
6994  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
6995  __pyx_t_6 = 0;
6996  __pyx_t_7 = 0;
6997  if (PyDict_SetItem(__pyx_t_1, __pyx_tuple__4, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
6998  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6999  __pyx_v_sdInfo = ((PyObject*)__pyx_t_1);
7000  __pyx_t_1 = 0;
7001 
7002  /* "ADR.pyx":502
7003  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7004  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7005  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7006  * nc,
7007  * mass,
7008  */
7009  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
7010  __Pyx_GOTREF(__pyx_t_1);
7011  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
7012  __Pyx_GOTREF(__pyx_t_2);
7013  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7014 
7015  /* "ADR.pyx":509
7016  * potential,
7017  * reaction,
7018  * hamiltonian, # <<<<<<<<<<<<<<
7019  * variableNames=['u'],
7020  * sparseDiffusionTensors=sdInfo,
7021  */
7022  __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
7023  __Pyx_GOTREF(__pyx_t_1);
7024  __Pyx_INCREF(__pyx_v_self);
7025  __Pyx_GIVEREF(__pyx_v_self);
7026  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
7027  __Pyx_INCREF(__pyx_v_nc);
7028  __Pyx_GIVEREF(__pyx_v_nc);
7029  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nc);
7030  __Pyx_INCREF(__pyx_v_mass);
7031  __Pyx_GIVEREF(__pyx_v_mass);
7032  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_mass);
7033  __Pyx_INCREF(__pyx_v_advection);
7034  __Pyx_GIVEREF(__pyx_v_advection);
7035  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_advection);
7036  __Pyx_INCREF(__pyx_v_diffusion);
7037  __Pyx_GIVEREF(__pyx_v_diffusion);
7038  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_diffusion);
7039  __Pyx_INCREF(__pyx_v_potential);
7040  __Pyx_GIVEREF(__pyx_v_potential);
7041  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_potential);
7042  __Pyx_INCREF(__pyx_v_reaction);
7043  __Pyx_GIVEREF(__pyx_v_reaction);
7044  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_reaction);
7045  __Pyx_INCREF(__pyx_v_hamiltonian);
7046  __Pyx_GIVEREF(__pyx_v_hamiltonian);
7047  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_hamiltonian);
7048 
7049  /* "ADR.pyx":510
7050  * reaction,
7051  * hamiltonian,
7052  * variableNames=['u'], # <<<<<<<<<<<<<<
7053  * sparseDiffusionTensors=sdInfo,
7054  * useSparseDiffusion=True,
7055  */
7056  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error)
7057  __Pyx_GOTREF(__pyx_t_7);
7058  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __pyx_L1_error)
7059  __Pyx_GOTREF(__pyx_t_6);
7060  __Pyx_INCREF(__pyx_n_s_u);
7061  __Pyx_GIVEREF(__pyx_n_s_u);
7062  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_u);
7063  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_variableNames, __pyx_t_6) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7064  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7065 
7066  /* "ADR.pyx":511
7067  * hamiltonian,
7068  * variableNames=['u'],
7069  * sparseDiffusionTensors=sdInfo, # <<<<<<<<<<<<<<
7070  * useSparseDiffusion=True,
7071  * movingDomain=False)
7072  */
7073  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_sparseDiffusionTensors, __pyx_v_sdInfo) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7074 
7075  /* "ADR.pyx":512
7076  * variableNames=['u'],
7077  * sparseDiffusionTensors=sdInfo,
7078  * useSparseDiffusion=True, # <<<<<<<<<<<<<<
7079  * movingDomain=False)
7080  * def initializeElementQuadrature(self,t,cq):
7081  */
7082  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_useSparseDiffusion, Py_True) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7083 
7084  /* "ADR.pyx":513
7085  * sparseDiffusionTensors=sdInfo,
7086  * useSparseDiffusion=True,
7087  * movingDomain=False) # <<<<<<<<<<<<<<
7088  * def initializeElementQuadrature(self,t,cq):
7089  * nd = self.nd
7090  */
7091  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
7092 
7093  /* "ADR.pyx":502
7094  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7095  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7096  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7097  * nc,
7098  * mass,
7099  */
7100  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 502, __pyx_L1_error)
7101  __Pyx_GOTREF(__pyx_t_6);
7102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7104  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7105  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7106 
7107  /* "ADR.pyx":472
7108  * """
7109  * from proteus.ctransportCoefficients import L2projectEvaluate
7110  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
7111  * timeVaryingCoefficients=False,
7112  * forceStrongDirichlet=False,
7113  */
7114 
7115  /* function exit code */
7116  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7117  goto __pyx_L0;
7118  __pyx_L1_error:;
7119  __Pyx_XDECREF(__pyx_t_1);
7120  __Pyx_XDECREF(__pyx_t_2);
7121  __Pyx_XDECREF(__pyx_t_5);
7122  __Pyx_XDECREF(__pyx_t_6);
7123  __Pyx_XDECREF(__pyx_t_7);
7124  __Pyx_XDECREF(__pyx_t_8);
7125  __Pyx_XDECREF(__pyx_t_9);
7126  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7127  __pyx_r = NULL;
7128  __pyx_L0:;
7129  __Pyx_XDECREF(__pyx_v_mass);
7130  __Pyx_XDECREF(__pyx_v_advection);
7131  __Pyx_XDECREF(__pyx_v_diffusion);
7132  __Pyx_XDECREF(__pyx_v_potential);
7133  __Pyx_XDECREF(__pyx_v_reaction);
7134  __Pyx_XDECREF(__pyx_v_hamiltonian);
7135  __Pyx_XDECREF(__pyx_v_i);
7136  __Pyx_XDECREF(__pyx_v_sdInfo);
7137  __Pyx_XDECREF(__pyx_v_row);
7138  __Pyx_XGIVEREF(__pyx_r);
7139  __Pyx_RefNannyFinishContext();
7140  return __pyx_r;
7141 }
7142 
7143 /* "ADR.pyx":514
7144  * useSparseDiffusion=True,
7145  * movingDomain=False)
7146  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
7147  * nd = self.nd
7148  * for ci in range(self.nc):
7149  */
7150 
7151 /* Python wrapper */
7152 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7153 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
7154 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7155  PyObject *__pyx_v_self = 0;
7156  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
7157  PyObject *__pyx_v_cq = 0;
7158  PyObject *__pyx_r = 0;
7159  __Pyx_RefNannyDeclarations
7160  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
7161  {
7162  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cq,0};
7163  PyObject* values[3] = {0,0,0};
7164  if (unlikely(__pyx_kwds)) {
7165  Py_ssize_t kw_args;
7166  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7167  switch (pos_args) {
7168  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7169  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7170  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7171  case 0: break;
7172  default: goto __pyx_L5_argtuple_error;
7173  }
7174  kw_args = PyDict_Size(__pyx_kwds);
7175  switch (pos_args) {
7176  case 0:
7177  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7178  else goto __pyx_L5_argtuple_error;
7179  case 1:
7180  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7181  else {
7182  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 1); __PYX_ERR(0, 514, __pyx_L3_error)
7183  }
7184  case 2:
7185  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
7186  else {
7187  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 2); __PYX_ERR(0, 514, __pyx_L3_error)
7188  }
7189  }
7190  if (unlikely(kw_args > 0)) {
7191  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(0, 514, __pyx_L3_error)
7192  }
7193  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7194  goto __pyx_L5_argtuple_error;
7195  } else {
7196  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7197  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7198  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7199  }
7200  __pyx_v_self = values[0];
7201  __pyx_v_t = values[1];
7202  __pyx_v_cq = values[2];
7203  }
7204  goto __pyx_L4_argument_unpacking_done;
7205  __pyx_L5_argtuple_error:;
7206  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error)
7207  __pyx_L3_error:;
7208  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7209  __Pyx_RefNannyFinishContext();
7210  return NULL;
7211  __pyx_L4_argument_unpacking_done:;
7212  __pyx_r = __pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cq);
7213 
7214  /* function exit code */
7215  __Pyx_RefNannyFinishContext();
7216  return __pyx_r;
7217 }
7218 
7219 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
7220  PyObject *__pyx_v_nd = NULL;
7221  PyObject *__pyx_v_ci = NULL;
7222  PyObject *__pyx_v_i = NULL;
7223  PyObject *__pyx_r = NULL;
7224  __Pyx_RefNannyDeclarations
7225  PyObject *__pyx_t_1 = NULL;
7226  PyObject *__pyx_t_2 = NULL;
7227  Py_ssize_t __pyx_t_3;
7228  PyObject *(*__pyx_t_4)(PyObject *);
7229  PyObject *__pyx_t_5 = NULL;
7230  PyObject *__pyx_t_6 = NULL;
7231  PyObject *__pyx_t_7 = NULL;
7232  PyObject *__pyx_t_8 = NULL;
7233  int __pyx_t_9;
7234  Py_ssize_t __pyx_t_10;
7235  PyObject *(*__pyx_t_11)(PyObject *);
7236  PyObject *__pyx_t_12 = NULL;
7237  PyObject *__pyx_t_13 = NULL;
7238  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
7239 
7240  /* "ADR.pyx":515
7241  * movingDomain=False)
7242  * def initializeElementQuadrature(self,t,cq):
7243  * nd = self.nd # <<<<<<<<<<<<<<
7244  * for ci in range(self.nc):
7245  * if cq.has_key(('df',ci,ci)):
7246  */
7247  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
7248  __Pyx_GOTREF(__pyx_t_1);
7249  __pyx_v_nd = __pyx_t_1;
7250  __pyx_t_1 = 0;
7251 
7252  /* "ADR.pyx":516
7253  * def initializeElementQuadrature(self,t,cq):
7254  * nd = self.nd
7255  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7256  * if cq.has_key(('df',ci,ci)):
7257  * if self.velocity != None:
7258  */
7259  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7260  __Pyx_GOTREF(__pyx_t_1);
7261  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
7262  __Pyx_GOTREF(__pyx_t_2);
7263  __Pyx_GIVEREF(__pyx_t_1);
7264  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7265  __pyx_t_1 = 0;
7266  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7267  __Pyx_GOTREF(__pyx_t_1);
7268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7269  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7270  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
7271  __pyx_t_4 = NULL;
7272  } else {
7273  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
7274  __Pyx_GOTREF(__pyx_t_2);
7275  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
7276  }
7277  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7278  for (;;) {
7279  if (likely(!__pyx_t_4)) {
7280  if (likely(PyList_CheckExact(__pyx_t_2))) {
7281  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
7282  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7283  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error)
7284  #else
7285  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7286  __Pyx_GOTREF(__pyx_t_1);
7287  #endif
7288  } else {
7289  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
7290  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7291  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error)
7292  #else
7293  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
7294  __Pyx_GOTREF(__pyx_t_1);
7295  #endif
7296  }
7297  } else {
7298  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
7299  if (unlikely(!__pyx_t_1)) {
7300  PyObject* exc_type = PyErr_Occurred();
7301  if (exc_type) {
7302  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7303  else __PYX_ERR(0, 516, __pyx_L1_error)
7304  }
7305  break;
7306  }
7307  __Pyx_GOTREF(__pyx_t_1);
7308  }
7309  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
7310  __pyx_t_1 = 0;
7311 
7312  /* "ADR.pyx":517
7313  * nd = self.nd
7314  * for ci in range(self.nc):
7315  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
7316  * if self.velocity != None:
7317  * cq[('df',ci,ci)][...,:] = self.velocity
7318  */
7319  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cq, __pyx_n_s_has_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)
7320  __Pyx_GOTREF(__pyx_t_5);
7321  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 517, __pyx_L1_error)
7322  __Pyx_GOTREF(__pyx_t_6);
7323  __Pyx_INCREF(__pyx_n_s_df);
7324  __Pyx_GIVEREF(__pyx_n_s_df);
7325  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_df);
7326  __Pyx_INCREF(__pyx_v_ci);
7327  __Pyx_GIVEREF(__pyx_v_ci);
7328  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
7329  __Pyx_INCREF(__pyx_v_ci);
7330  __Pyx_GIVEREF(__pyx_v_ci);
7331  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
7332  __pyx_t_7 = NULL;
7333  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
7334  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
7335  if (likely(__pyx_t_7)) {
7336  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7337  __Pyx_INCREF(__pyx_t_7);
7338  __Pyx_INCREF(function);
7339  __Pyx_DECREF_SET(__pyx_t_5, function);
7340  }
7341  }
7342  if (!__pyx_t_7) {
7343  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7344  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7345  __Pyx_GOTREF(__pyx_t_1);
7346  } else {
7347  #if CYTHON_FAST_PYCALL
7348  if (PyFunction_Check(__pyx_t_5)) {
7349  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
7350  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7351  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7352  __Pyx_GOTREF(__pyx_t_1);
7353  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7354  } else
7355  #endif
7356  #if CYTHON_FAST_PYCCALL
7357  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7358  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
7359  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7360  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7361  __Pyx_GOTREF(__pyx_t_1);
7362  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7363  } else
7364  #endif
7365  {
7366  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L1_error)
7367  __Pyx_GOTREF(__pyx_t_8);
7368  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
7369  __Pyx_GIVEREF(__pyx_t_6);
7370  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
7371  __pyx_t_6 = 0;
7372  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
7373  __Pyx_GOTREF(__pyx_t_1);
7374  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7375  }
7376  }
7377  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7378  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 517, __pyx_L1_error)
7379  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7380  if (__pyx_t_9) {
7381 
7382  /* "ADR.pyx":518
7383  * for ci in range(self.nc):
7384  * if cq.has_key(('df',ci,ci)):
7385  * if self.velocity != None: # <<<<<<<<<<<<<<
7386  * cq[('df',ci,ci)][...,:] = self.velocity
7387  * else:
7388  */
7389  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
7390  __Pyx_GOTREF(__pyx_t_1);
7391  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error)
7392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7393  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 518, __pyx_L1_error)
7394  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7395  if (__pyx_t_9) {
7396 
7397  /* "ADR.pyx":519
7398  * if cq.has_key(('df',ci,ci)):
7399  * if self.velocity != None:
7400  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
7401  * else:
7402  * cq[('df',ci,ci)].flat[:] = 0.0
7403  */
7404  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 519, __pyx_L1_error)
7405  __Pyx_GOTREF(__pyx_t_5);
7406  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
7407  __Pyx_GOTREF(__pyx_t_1);
7408  __Pyx_INCREF(__pyx_n_s_df);
7409  __Pyx_GIVEREF(__pyx_n_s_df);
7410  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
7411  __Pyx_INCREF(__pyx_v_ci);
7412  __Pyx_GIVEREF(__pyx_v_ci);
7413  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
7414  __Pyx_INCREF(__pyx_v_ci);
7415  __Pyx_GIVEREF(__pyx_v_ci);
7416  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
7417  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
7418  __Pyx_GOTREF(__pyx_t_8);
7419  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7420  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__6, __pyx_t_5) < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
7421  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7423 
7424  /* "ADR.pyx":518
7425  * for ci in range(self.nc):
7426  * if cq.has_key(('df',ci,ci)):
7427  * if self.velocity != None: # <<<<<<<<<<<<<<
7428  * cq[('df',ci,ci)][...,:] = self.velocity
7429  * else:
7430  */
7431  goto __pyx_L6;
7432  }
7433 
7434  /* "ADR.pyx":521
7435  * cq[('df',ci,ci)][...,:] = self.velocity
7436  * else:
7437  * cq[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
7438  * for i in range(len(cq[('r',ci)].flat)):
7439  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7440  */
7441  /*else*/ {
7442  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
7443  __Pyx_GOTREF(__pyx_t_5);
7444  __Pyx_INCREF(__pyx_n_s_df);
7445  __Pyx_GIVEREF(__pyx_n_s_df);
7446  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_df);
7447  __Pyx_INCREF(__pyx_v_ci);
7448  __Pyx_GIVEREF(__pyx_v_ci);
7449  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
7450  __Pyx_INCREF(__pyx_v_ci);
7451  __Pyx_GIVEREF(__pyx_v_ci);
7452  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
7453  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error)
7454  __Pyx_GOTREF(__pyx_t_8);
7455  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7456  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
7457  __Pyx_GOTREF(__pyx_t_5);
7458  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7459  if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__7, 0, 0, 1) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
7460  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7461  }
7462  __pyx_L6:;
7463 
7464  /* "ADR.pyx":517
7465  * nd = self.nd
7466  * for ci in range(self.nc):
7467  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
7468  * if self.velocity != None:
7469  * cq[('df',ci,ci)][...,:] = self.velocity
7470  */
7471  }
7472 
7473  /* "ADR.pyx":522
7474  * else:
7475  * cq[('df',ci,ci)].flat[:] = 0.0
7476  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
7477  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7478  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7479  */
7480  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7481  __Pyx_GOTREF(__pyx_t_5);
7482  __Pyx_INCREF(__pyx_n_s_r);
7483  __Pyx_GIVEREF(__pyx_n_s_r);
7484  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_r);
7485  __Pyx_INCREF(__pyx_v_ci);
7486  __Pyx_GIVEREF(__pyx_v_ci);
7487  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
7488  __pyx_t_8 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7489  __Pyx_GOTREF(__pyx_t_8);
7490  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7491  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7492  __Pyx_GOTREF(__pyx_t_5);
7493  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7494  __pyx_t_10 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 522, __pyx_L1_error)
7495  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7496  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7497  __Pyx_GOTREF(__pyx_t_5);
7498  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7499  __Pyx_GOTREF(__pyx_t_8);
7500  __Pyx_GIVEREF(__pyx_t_5);
7501  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
7502  __pyx_t_5 = 0;
7503  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7504  __Pyx_GOTREF(__pyx_t_5);
7505  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7506  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
7507  __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
7508  __pyx_t_11 = NULL;
7509  } else {
7510  __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 522, __pyx_L1_error)
7511  __Pyx_GOTREF(__pyx_t_8);
7512  __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L1_error)
7513  }
7514  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7515  for (;;) {
7516  if (likely(!__pyx_t_11)) {
7517  if (likely(PyList_CheckExact(__pyx_t_8))) {
7518  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
7519  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7520  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
7521  #else
7522  __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7523  __Pyx_GOTREF(__pyx_t_5);
7524  #endif
7525  } else {
7526  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
7527  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7528  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
7529  #else
7530  __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
7531  __Pyx_GOTREF(__pyx_t_5);
7532  #endif
7533  }
7534  } else {
7535  __pyx_t_5 = __pyx_t_11(__pyx_t_8);
7536  if (unlikely(!__pyx_t_5)) {
7537  PyObject* exc_type = PyErr_Occurred();
7538  if (exc_type) {
7539  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7540  else __PYX_ERR(0, 522, __pyx_L1_error)
7541  }
7542  break;
7543  }
7544  __Pyx_GOTREF(__pyx_t_5);
7545  }
7546  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
7547  __pyx_t_5 = 0;
7548 
7549  /* "ADR.pyx":523
7550  * cq[('df',ci,ci)].flat[:] = 0.0
7551  * for i in range(len(cq[('r',ci)].flat)):
7552  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
7553  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7554  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7555  */
7556  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7557  __Pyx_GOTREF(__pyx_t_1);
7558  __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
7559  __Pyx_GOTREF(__pyx_t_6);
7560  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7561  __pyx_t_1 = PyObject_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7562  __Pyx_GOTREF(__pyx_t_1);
7563  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L1_error)
7564  __Pyx_GOTREF(__pyx_t_7);
7565  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7566  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7567  __Pyx_GOTREF(__pyx_t_1);
7568  __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 523, __pyx_L1_error)
7569  __Pyx_GOTREF(__pyx_t_12);
7570  __pyx_t_13 = PyNumber_Multiply(__pyx_int_3, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 523, __pyx_L1_error)
7571  __Pyx_GOTREF(__pyx_t_13);
7572  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7573  __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_1, &__pyx_t_13, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 523, __pyx_L1_error)
7574  __Pyx_GOTREF(__pyx_t_12);
7575  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7576  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7577  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7578  __pyx_t_13 = NULL;
7579  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7580  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
7581  if (likely(__pyx_t_13)) {
7582  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7583  __Pyx_INCREF(__pyx_t_13);
7584  __Pyx_INCREF(function);
7585  __Pyx_DECREF_SET(__pyx_t_6, function);
7586  }
7587  }
7588  if (!__pyx_t_13) {
7589  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7590  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7591  __Pyx_GOTREF(__pyx_t_5);
7592  } else {
7593  #if CYTHON_FAST_PYCALL
7594  if (PyFunction_Check(__pyx_t_6)) {
7595  PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
7596  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7597  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7598  __Pyx_GOTREF(__pyx_t_5);
7599  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7600  } else
7601  #endif
7602  #if CYTHON_FAST_PYCCALL
7603  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
7604  PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
7605  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7606  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7607  __Pyx_GOTREF(__pyx_t_5);
7608  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7609  } else
7610  #endif
7611  {
7612  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7613  __Pyx_GOTREF(__pyx_t_1);
7614  __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13); __pyx_t_13 = NULL;
7615  __Pyx_GIVEREF(__pyx_t_12);
7616  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_12);
7617  __pyx_t_12 = 0;
7618  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7619  __Pyx_GOTREF(__pyx_t_5);
7620  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7621  }
7622  }
7623  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7624  __pyx_t_6 = PyNumber_Negative(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
7625  __Pyx_GOTREF(__pyx_t_6);
7626  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7627  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7628  __Pyx_GOTREF(__pyx_t_5);
7629  __Pyx_INCREF(__pyx_n_s_r);
7630  __Pyx_GIVEREF(__pyx_n_s_r);
7631  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_r);
7632  __Pyx_INCREF(__pyx_v_ci);
7633  __Pyx_GIVEREF(__pyx_v_ci);
7634  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
7635  __pyx_t_1 = PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
7636  __Pyx_GOTREF(__pyx_t_1);
7637  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7638  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error)
7639  __Pyx_GOTREF(__pyx_t_5);
7640  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7641  if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
7642  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7643  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7644 
7645  /* "ADR.pyx":524
7646  * for i in range(len(cq[('r',ci)].flat)):
7647  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7648  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
7649  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7650  * nd = self.nd
7651  */
7652  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7653  __Pyx_GOTREF(__pyx_t_5);
7654  __pyx_t_1 = PyObject_GetItem(__pyx_t_5, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7655  __Pyx_GOTREF(__pyx_t_1);
7656  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7657  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7658  __Pyx_GOTREF(__pyx_t_5);
7659  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 524, __pyx_L1_error)
7660  __Pyx_GOTREF(__pyx_t_12);
7661  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7662  __pyx_t_5 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7663  __Pyx_GOTREF(__pyx_t_5);
7664  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 524, __pyx_L1_error)
7665  __Pyx_GOTREF(__pyx_t_13);
7666  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
7667  __Pyx_GOTREF(__pyx_t_7);
7668  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7669  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, &__pyx_t_5, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 524, __pyx_L1_error)
7670  __Pyx_GOTREF(__pyx_t_13);
7671  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7672  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7673  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7674  __pyx_t_7 = NULL;
7675  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
7676  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
7677  if (likely(__pyx_t_7)) {
7678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
7679  __Pyx_INCREF(__pyx_t_7);
7680  __Pyx_INCREF(function);
7681  __Pyx_DECREF_SET(__pyx_t_1, function);
7682  }
7683  }
7684  if (!__pyx_t_7) {
7685  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7686  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7687  __Pyx_GOTREF(__pyx_t_6);
7688  } else {
7689  #if CYTHON_FAST_PYCALL
7690  if (PyFunction_Check(__pyx_t_1)) {
7691  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_13};
7692  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7693  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7694  __Pyx_GOTREF(__pyx_t_6);
7695  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7696  } else
7697  #endif
7698  #if CYTHON_FAST_PYCCALL
7699  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
7700  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_13};
7701  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7702  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7703  __Pyx_GOTREF(__pyx_t_6);
7704  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7705  } else
7706  #endif
7707  {
7708  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7709  __Pyx_GOTREF(__pyx_t_5);
7710  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
7711  __Pyx_GIVEREF(__pyx_t_13);
7712  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_13);
7713  __pyx_t_13 = 0;
7714  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7715  __Pyx_GOTREF(__pyx_t_6);
7716  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7717  }
7718  }
7719  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7720  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
7721  __Pyx_GOTREF(__pyx_t_1);
7722  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7723  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7724  __Pyx_GOTREF(__pyx_t_6);
7725  __Pyx_INCREF(__pyx_n_s_a);
7726  __Pyx_GIVEREF(__pyx_n_s_a);
7727  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_a);
7728  __Pyx_INCREF(__pyx_v_ci);
7729  __Pyx_GIVEREF(__pyx_v_ci);
7730  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
7731  __Pyx_INCREF(__pyx_v_ci);
7732  __Pyx_GIVEREF(__pyx_v_ci);
7733  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
7734  __pyx_t_5 = PyObject_GetItem(__pyx_v_cq, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7735  __Pyx_GOTREF(__pyx_t_5);
7736  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7737  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __pyx_L1_error)
7738  __Pyx_GOTREF(__pyx_t_6);
7739  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7740  __pyx_t_5 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7741  __Pyx_GOTREF(__pyx_t_5);
7742  __pyx_t_13 = PyNumber_Multiply(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 524, __pyx_L1_error)
7743  __Pyx_GOTREF(__pyx_t_13);
7744  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7745  __pyx_t_5 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)
7746  __Pyx_GOTREF(__pyx_t_5);
7747  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
7748  __Pyx_GOTREF(__pyx_t_7);
7749  __pyx_t_12 = PyNumber_Multiply(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 524, __pyx_L1_error)
7750  __Pyx_GOTREF(__pyx_t_12);
7751  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7752  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7753  if (__Pyx_PyObject_SetSlice(__pyx_t_6, __pyx_t_1, 0, 0, &__pyx_t_13, &__pyx_t_12, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
7754  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7755  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7756  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7757  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7758 
7759  /* "ADR.pyx":522
7760  * else:
7761  * cq[('df',ci,ci)].flat[:] = 0.0
7762  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
7763  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7764  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7765  */
7766  }
7767  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7768 
7769  /* "ADR.pyx":516
7770  * def initializeElementQuadrature(self,t,cq):
7771  * nd = self.nd
7772  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7773  * if cq.has_key(('df',ci,ci)):
7774  * if self.velocity != None:
7775  */
7776  }
7777  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7778 
7779  /* "ADR.pyx":514
7780  * useSparseDiffusion=True,
7781  * movingDomain=False)
7782  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
7783  * nd = self.nd
7784  * for ci in range(self.nc):
7785  */
7786 
7787  /* function exit code */
7788  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7789  goto __pyx_L0;
7790  __pyx_L1_error:;
7791  __Pyx_XDECREF(__pyx_t_1);
7792  __Pyx_XDECREF(__pyx_t_2);
7793  __Pyx_XDECREF(__pyx_t_5);
7794  __Pyx_XDECREF(__pyx_t_6);
7795  __Pyx_XDECREF(__pyx_t_7);
7796  __Pyx_XDECREF(__pyx_t_8);
7797  __Pyx_XDECREF(__pyx_t_12);
7798  __Pyx_XDECREF(__pyx_t_13);
7799  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7800  __pyx_r = NULL;
7801  __pyx_L0:;
7802  __Pyx_XDECREF(__pyx_v_nd);
7803  __Pyx_XDECREF(__pyx_v_ci);
7804  __Pyx_XDECREF(__pyx_v_i);
7805  __Pyx_XGIVEREF(__pyx_r);
7806  __Pyx_RefNannyFinishContext();
7807  return __pyx_r;
7808 }
7809 
7810 /* "ADR.pyx":525
7811  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7812  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7813  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
7814  * nd = self.nd
7815  * for c in [cebq,cebq_global]:
7816  */
7817 
7818 /* Python wrapper */
7819 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7820 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature = {"initializeElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
7821 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7822  PyObject *__pyx_v_self = 0;
7823  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
7824  PyObject *__pyx_v_cebq = 0;
7825  PyObject *__pyx_v_cebq_global = 0;
7826  PyObject *__pyx_r = 0;
7827  __Pyx_RefNannyDeclarations
7828  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature (wrapper)", 0);
7829  {
7830  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebq,&__pyx_n_s_cebq_global,0};
7831  PyObject* values[4] = {0,0,0,0};
7832  if (unlikely(__pyx_kwds)) {
7833  Py_ssize_t kw_args;
7834  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7835  switch (pos_args) {
7836  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7837  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7838  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7839  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7840  case 0: break;
7841  default: goto __pyx_L5_argtuple_error;
7842  }
7843  kw_args = PyDict_Size(__pyx_kwds);
7844  switch (pos_args) {
7845  case 0:
7846  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7847  else goto __pyx_L5_argtuple_error;
7848  case 1:
7849  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7850  else {
7851  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 1); __PYX_ERR(0, 525, __pyx_L3_error)
7852  }
7853  case 2:
7854  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebq)) != 0)) kw_args--;
7855  else {
7856  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 2); __PYX_ERR(0, 525, __pyx_L3_error)
7857  }
7858  case 3:
7859  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebq_global)) != 0)) kw_args--;
7860  else {
7861  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 3); __PYX_ERR(0, 525, __pyx_L3_error)
7862  }
7863  }
7864  if (unlikely(kw_args > 0)) {
7865  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementBoundaryQuadrature") < 0)) __PYX_ERR(0, 525, __pyx_L3_error)
7866  }
7867  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
7868  goto __pyx_L5_argtuple_error;
7869  } else {
7870  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7871  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7872  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7873  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7874  }
7875  __pyx_v_self = values[0];
7876  __pyx_v_t = values[1];
7877  __pyx_v_cebq = values[2];
7878  __pyx_v_cebq_global = values[3];
7879  }
7880  goto __pyx_L4_argument_unpacking_done;
7881  __pyx_L5_argtuple_error:;
7882  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 525, __pyx_L3_error)
7883  __pyx_L3_error:;
7884  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7885  __Pyx_RefNannyFinishContext();
7886  return NULL;
7887  __pyx_L4_argument_unpacking_done:;
7888  __pyx_r = __pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebq, __pyx_v_cebq_global);
7889 
7890  /* function exit code */
7891  __Pyx_RefNannyFinishContext();
7892  return __pyx_r;
7893 }
7894 
7895 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global) {
7896  PyObject *__pyx_v_nd = NULL;
7897  PyObject *__pyx_v_c = NULL;
7898  PyObject *__pyx_v_ci = NULL;
7899  PyObject *__pyx_v_i = NULL;
7900  PyObject *__pyx_r = NULL;
7901  __Pyx_RefNannyDeclarations
7902  PyObject *__pyx_t_1 = NULL;
7903  PyObject *__pyx_t_2 = NULL;
7904  Py_ssize_t __pyx_t_3;
7905  PyObject *__pyx_t_4 = NULL;
7906  Py_ssize_t __pyx_t_5;
7907  PyObject *(*__pyx_t_6)(PyObject *);
7908  PyObject *__pyx_t_7 = NULL;
7909  PyObject *__pyx_t_8 = NULL;
7910  PyObject *__pyx_t_9 = NULL;
7911  PyObject *__pyx_t_10 = NULL;
7912  int __pyx_t_11;
7913  int __pyx_t_12;
7914  Py_ssize_t __pyx_t_13;
7915  PyObject *(*__pyx_t_14)(PyObject *);
7916  PyObject *__pyx_t_15 = NULL;
7917  PyObject *__pyx_t_16 = NULL;
7918  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature", 0);
7919 
7920  /* "ADR.pyx":526
7921  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
7922  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7923  * nd = self.nd # <<<<<<<<<<<<<<
7924  * for c in [cebq,cebq_global]:
7925  * for ci in range(self.nc):
7926  */
7927  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
7928  __Pyx_GOTREF(__pyx_t_1);
7929  __pyx_v_nd = __pyx_t_1;
7930  __pyx_t_1 = 0;
7931 
7932  /* "ADR.pyx":527
7933  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
7934  * nd = self.nd
7935  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
7936  * for ci in range(self.nc):
7937  * if c.has_key(('df',ci,ci)):
7938  */
7939  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
7940  __Pyx_GOTREF(__pyx_t_1);
7941  __Pyx_INCREF(__pyx_v_cebq);
7942  __Pyx_GIVEREF(__pyx_v_cebq);
7943  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebq);
7944  __Pyx_INCREF(__pyx_v_cebq_global);
7945  __Pyx_GIVEREF(__pyx_v_cebq_global);
7946  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_cebq_global);
7947  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
7948  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7949  for (;;) {
7950  if (__pyx_t_3 >= 2) break;
7951  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7952  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 527, __pyx_L1_error)
7953  #else
7954  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
7955  __Pyx_GOTREF(__pyx_t_1);
7956  #endif
7957  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
7958  __pyx_t_1 = 0;
7959 
7960  /* "ADR.pyx":528
7961  * nd = self.nd
7962  * for c in [cebq,cebq_global]:
7963  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7964  * if c.has_key(('df',ci,ci)):
7965  * if self.velocity != None:
7966  */
7967  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7968  __Pyx_GOTREF(__pyx_t_1);
7969  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
7970  __Pyx_GOTREF(__pyx_t_4);
7971  __Pyx_GIVEREF(__pyx_t_1);
7972  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
7973  __pyx_t_1 = 0;
7974  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7975  __Pyx_GOTREF(__pyx_t_1);
7976  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7977  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7978  __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
7979  __pyx_t_6 = NULL;
7980  } else {
7981  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error)
7982  __Pyx_GOTREF(__pyx_t_4);
7983  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 528, __pyx_L1_error)
7984  }
7985  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7986  for (;;) {
7987  if (likely(!__pyx_t_6)) {
7988  if (likely(PyList_CheckExact(__pyx_t_4))) {
7989  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
7990  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7991  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 528, __pyx_L1_error)
7992  #else
7993  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
7994  __Pyx_GOTREF(__pyx_t_1);
7995  #endif
7996  } else {
7997  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7998  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7999  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 528, __pyx_L1_error)
8000  #else
8001  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
8002  __Pyx_GOTREF(__pyx_t_1);
8003  #endif
8004  }
8005  } else {
8006  __pyx_t_1 = __pyx_t_6(__pyx_t_4);
8007  if (unlikely(!__pyx_t_1)) {
8008  PyObject* exc_type = PyErr_Occurred();
8009  if (exc_type) {
8010  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8011  else __PYX_ERR(0, 528, __pyx_L1_error)
8012  }
8013  break;
8014  }
8015  __Pyx_GOTREF(__pyx_t_1);
8016  }
8017  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
8018  __pyx_t_1 = 0;
8019 
8020  /* "ADR.pyx":529
8021  * for c in [cebq,cebq_global]:
8022  * for ci in range(self.nc):
8023  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8024  * if self.velocity != None:
8025  * c[('df',ci,ci)][...,:] = self.velocity
8026  */
8027  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error)
8028  __Pyx_GOTREF(__pyx_t_7);
8029  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
8030  __Pyx_GOTREF(__pyx_t_8);
8031  __Pyx_INCREF(__pyx_n_s_df);
8032  __Pyx_GIVEREF(__pyx_n_s_df);
8033  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
8034  __Pyx_INCREF(__pyx_v_ci);
8035  __Pyx_GIVEREF(__pyx_v_ci);
8036  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8037  __Pyx_INCREF(__pyx_v_ci);
8038  __Pyx_GIVEREF(__pyx_v_ci);
8039  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
8040  __pyx_t_9 = NULL;
8041  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8042  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
8043  if (likely(__pyx_t_9)) {
8044  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8045  __Pyx_INCREF(__pyx_t_9);
8046  __Pyx_INCREF(function);
8047  __Pyx_DECREF_SET(__pyx_t_7, function);
8048  }
8049  }
8050  if (!__pyx_t_9) {
8051  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8052  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8053  __Pyx_GOTREF(__pyx_t_1);
8054  } else {
8055  #if CYTHON_FAST_PYCALL
8056  if (PyFunction_Check(__pyx_t_7)) {
8057  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8058  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8059  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8060  __Pyx_GOTREF(__pyx_t_1);
8061  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8062  } else
8063  #endif
8064  #if CYTHON_FAST_PYCCALL
8065  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
8066  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8067  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8068  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8069  __Pyx_GOTREF(__pyx_t_1);
8070  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8071  } else
8072  #endif
8073  {
8074  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 529, __pyx_L1_error)
8075  __Pyx_GOTREF(__pyx_t_10);
8076  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
8077  __Pyx_GIVEREF(__pyx_t_8);
8078  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
8079  __pyx_t_8 = 0;
8080  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
8081  __Pyx_GOTREF(__pyx_t_1);
8082  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8083  }
8084  }
8085  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8086  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 529, __pyx_L1_error)
8087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8088  if (__pyx_t_11) {
8089 
8090  /* "ADR.pyx":530
8091  * for ci in range(self.nc):
8092  * if c.has_key(('df',ci,ci)):
8093  * if self.velocity != None: # <<<<<<<<<<<<<<
8094  * c[('df',ci,ci)][...,:] = self.velocity
8095  * else:
8096  */
8097  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
8098  __Pyx_GOTREF(__pyx_t_1);
8099  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error)
8100  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8101  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 530, __pyx_L1_error)
8102  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8103  if (__pyx_t_11) {
8104 
8105  /* "ADR.pyx":531
8106  * if c.has_key(('df',ci,ci)):
8107  * if self.velocity != None:
8108  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
8109  * else:
8110  * c[('df',ci,ci)].flat[:] = 0.0
8111  */
8112  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error)
8113  __Pyx_GOTREF(__pyx_t_7);
8114  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
8115  __Pyx_GOTREF(__pyx_t_1);
8116  __Pyx_INCREF(__pyx_n_s_df);
8117  __Pyx_GIVEREF(__pyx_n_s_df);
8118  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
8119  __Pyx_INCREF(__pyx_v_ci);
8120  __Pyx_GIVEREF(__pyx_v_ci);
8121  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8122  __Pyx_INCREF(__pyx_v_ci);
8123  __Pyx_GIVEREF(__pyx_v_ci);
8124  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
8125  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 531, __pyx_L1_error)
8126  __Pyx_GOTREF(__pyx_t_10);
8127  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8128  if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_tuple__9, __pyx_t_7) < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
8129  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8130  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8131 
8132  /* "ADR.pyx":530
8133  * for ci in range(self.nc):
8134  * if c.has_key(('df',ci,ci)):
8135  * if self.velocity != None: # <<<<<<<<<<<<<<
8136  * c[('df',ci,ci)][...,:] = self.velocity
8137  * else:
8138  */
8139  goto __pyx_L8;
8140  }
8141 
8142  /* "ADR.pyx":533
8143  * c[('df',ci,ci)][...,:] = self.velocity
8144  * else:
8145  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
8146  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8147  * for i in range(len(c[('u',ci)].flat)):
8148  */
8149  /*else*/ {
8150  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 533, __pyx_L1_error)
8151  __Pyx_GOTREF(__pyx_t_7);
8152  __Pyx_INCREF(__pyx_n_s_df);
8153  __Pyx_GIVEREF(__pyx_n_s_df);
8154  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
8155  __Pyx_INCREF(__pyx_v_ci);
8156  __Pyx_GIVEREF(__pyx_v_ci);
8157  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8158  __Pyx_INCREF(__pyx_v_ci);
8159  __Pyx_GIVEREF(__pyx_v_ci);
8160  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8161  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 533, __pyx_L1_error)
8162  __Pyx_GOTREF(__pyx_t_10);
8163  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8164  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 533, __pyx_L1_error)
8165  __Pyx_GOTREF(__pyx_t_7);
8166  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8167  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__10, 0, 0, 1) < 0) __PYX_ERR(0, 533, __pyx_L1_error)
8168  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8169  }
8170  __pyx_L8:;
8171 
8172  /* "ADR.pyx":529
8173  * for c in [cebq,cebq_global]:
8174  * for ci in range(self.nc):
8175  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8176  * if self.velocity != None:
8177  * c[('df',ci,ci)][...,:] = self.velocity
8178  */
8179  }
8180 
8181  /* "ADR.pyx":534
8182  * else:
8183  * c[('df',ci,ci)].flat[:] = 0.0
8184  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8185  * for i in range(len(c[('u',ci)].flat)):
8186  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8187  */
8188  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 534, __pyx_L1_error)
8189  __Pyx_GOTREF(__pyx_t_10);
8190  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
8191  __Pyx_GOTREF(__pyx_t_1);
8192  __Pyx_INCREF(__pyx_n_s_r);
8193  __Pyx_GIVEREF(__pyx_n_s_r);
8194  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
8195  __Pyx_INCREF(__pyx_v_ci);
8196  __Pyx_GIVEREF(__pyx_v_ci);
8197  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8198  __pyx_t_8 = NULL;
8199  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
8200  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
8201  if (likely(__pyx_t_8)) {
8202  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
8203  __Pyx_INCREF(__pyx_t_8);
8204  __Pyx_INCREF(function);
8205  __Pyx_DECREF_SET(__pyx_t_10, function);
8206  }
8207  }
8208  if (!__pyx_t_8) {
8209  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8211  __Pyx_GOTREF(__pyx_t_7);
8212  } else {
8213  #if CYTHON_FAST_PYCALL
8214  if (PyFunction_Check(__pyx_t_10)) {
8215  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
8216  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8217  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8218  __Pyx_GOTREF(__pyx_t_7);
8219  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8220  } else
8221  #endif
8222  #if CYTHON_FAST_PYCCALL
8223  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
8224  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
8225  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8226  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
8227  __Pyx_GOTREF(__pyx_t_7);
8228  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8229  } else
8230  #endif
8231  {
8232  __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L1_error)
8233  __Pyx_GOTREF(__pyx_t_9);
8234  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
8235  __Pyx_GIVEREF(__pyx_t_1);
8236  PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1);
8237  __pyx_t_1 = 0;
8238  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8239  __Pyx_GOTREF(__pyx_t_7);
8240  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8241  }
8242  }
8243  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8244  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8245  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8246  if (__pyx_t_12) {
8247  } else {
8248  __pyx_t_11 = __pyx_t_12;
8249  goto __pyx_L10_bool_binop_done;
8250  }
8251  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 534, __pyx_L1_error)
8252  __Pyx_GOTREF(__pyx_t_10);
8253  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 534, __pyx_L1_error)
8254  __Pyx_GOTREF(__pyx_t_9);
8255  __Pyx_INCREF(__pyx_n_s_a);
8256  __Pyx_GIVEREF(__pyx_n_s_a);
8257  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
8258  __Pyx_INCREF(__pyx_v_ci);
8259  __Pyx_GIVEREF(__pyx_v_ci);
8260  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
8261  __Pyx_INCREF(__pyx_v_ci);
8262  __Pyx_GIVEREF(__pyx_v_ci);
8263  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
8264  __pyx_t_1 = NULL;
8265  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
8266  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
8267  if (likely(__pyx_t_1)) {
8268  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
8269  __Pyx_INCREF(__pyx_t_1);
8270  __Pyx_INCREF(function);
8271  __Pyx_DECREF_SET(__pyx_t_10, function);
8272  }
8273  }
8274  if (!__pyx_t_1) {
8275  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8276  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8277  __Pyx_GOTREF(__pyx_t_7);
8278  } else {
8279  #if CYTHON_FAST_PYCALL
8280  if (PyFunction_Check(__pyx_t_10)) {
8281  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
8282  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8283  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8284  __Pyx_GOTREF(__pyx_t_7);
8285  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8286  } else
8287  #endif
8288  #if CYTHON_FAST_PYCCALL
8289  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
8290  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
8291  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8292  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8293  __Pyx_GOTREF(__pyx_t_7);
8294  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8295  } else
8296  #endif
8297  {
8298  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L1_error)
8299  __Pyx_GOTREF(__pyx_t_8);
8300  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
8301  __Pyx_GIVEREF(__pyx_t_9);
8302  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
8303  __pyx_t_9 = 0;
8304  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
8305  __Pyx_GOTREF(__pyx_t_7);
8306  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8307  }
8308  }
8309  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8310  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8311  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8312  __pyx_t_11 = __pyx_t_12;
8313  __pyx_L10_bool_binop_done:;
8314  if (__pyx_t_11) {
8315 
8316  /* "ADR.pyx":535
8317  * c[('df',ci,ci)].flat[:] = 0.0
8318  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8319  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8320  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8321  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8322  */
8323  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8324  __Pyx_GOTREF(__pyx_t_7);
8325  __Pyx_INCREF(__pyx_n_s_u);
8326  __Pyx_GIVEREF(__pyx_n_s_u);
8327  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_u);
8328  __Pyx_INCREF(__pyx_v_ci);
8329  __Pyx_GIVEREF(__pyx_v_ci);
8330  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8331  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8332  __Pyx_GOTREF(__pyx_t_10);
8333  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8334  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8335  __Pyx_GOTREF(__pyx_t_7);
8336  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8337  __pyx_t_13 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 535, __pyx_L1_error)
8338  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8339  __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8340  __Pyx_GOTREF(__pyx_t_7);
8341  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8342  __Pyx_GOTREF(__pyx_t_10);
8343  __Pyx_GIVEREF(__pyx_t_7);
8344  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
8345  __pyx_t_7 = 0;
8346  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8347  __Pyx_GOTREF(__pyx_t_7);
8348  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8349  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
8350  __pyx_t_10 = __pyx_t_7; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
8351  __pyx_t_14 = NULL;
8352  } else {
8353  __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 535, __pyx_L1_error)
8354  __Pyx_GOTREF(__pyx_t_10);
8355  __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 535, __pyx_L1_error)
8356  }
8357  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8358  for (;;) {
8359  if (likely(!__pyx_t_14)) {
8360  if (likely(PyList_CheckExact(__pyx_t_10))) {
8361  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
8362  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8363  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
8364  #else
8365  __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8366  __Pyx_GOTREF(__pyx_t_7);
8367  #endif
8368  } else {
8369  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
8370  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8371  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
8372  #else
8373  __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
8374  __Pyx_GOTREF(__pyx_t_7);
8375  #endif
8376  }
8377  } else {
8378  __pyx_t_7 = __pyx_t_14(__pyx_t_10);
8379  if (unlikely(!__pyx_t_7)) {
8380  PyObject* exc_type = PyErr_Occurred();
8381  if (exc_type) {
8382  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8383  else __PYX_ERR(0, 535, __pyx_L1_error)
8384  }
8385  break;
8386  }
8387  __Pyx_GOTREF(__pyx_t_7);
8388  }
8389  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
8390  __pyx_t_7 = 0;
8391 
8392  /* "ADR.pyx":536
8393  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8394  * for i in range(len(c[('u',ci)].flat)):
8395  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
8396  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8397  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8398  */
8399  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8400  __Pyx_GOTREF(__pyx_t_8);
8401  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
8402  __Pyx_GOTREF(__pyx_t_9);
8403  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8404  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8405  __Pyx_GOTREF(__pyx_t_8);
8406  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
8407  __Pyx_GOTREF(__pyx_t_1);
8408  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8409  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8410  __Pyx_GOTREF(__pyx_t_8);
8411  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 536, __pyx_L1_error)
8412  __Pyx_GOTREF(__pyx_t_15);
8413  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 536, __pyx_L1_error)
8414  __Pyx_GOTREF(__pyx_t_16);
8415  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8416  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_t_8, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 536, __pyx_L1_error)
8417  __Pyx_GOTREF(__pyx_t_15);
8418  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8419  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8420  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8421  __pyx_t_16 = NULL;
8422  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
8423  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
8424  if (likely(__pyx_t_16)) {
8425  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
8426  __Pyx_INCREF(__pyx_t_16);
8427  __Pyx_INCREF(function);
8428  __Pyx_DECREF_SET(__pyx_t_9, function);
8429  }
8430  }
8431  if (!__pyx_t_16) {
8432  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8433  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8434  __Pyx_GOTREF(__pyx_t_7);
8435  } else {
8436  #if CYTHON_FAST_PYCALL
8437  if (PyFunction_Check(__pyx_t_9)) {
8438  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
8439  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8440  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
8441  __Pyx_GOTREF(__pyx_t_7);
8442  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8443  } else
8444  #endif
8445  #if CYTHON_FAST_PYCCALL
8446  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
8447  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
8448  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8449  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
8450  __Pyx_GOTREF(__pyx_t_7);
8451  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8452  } else
8453  #endif
8454  {
8455  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8456  __Pyx_GOTREF(__pyx_t_8);
8457  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
8458  __Pyx_GIVEREF(__pyx_t_15);
8459  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_15);
8460  __pyx_t_15 = 0;
8461  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8462  __Pyx_GOTREF(__pyx_t_7);
8463  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8464  }
8465  }
8466  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8467  __pyx_t_9 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
8468  __Pyx_GOTREF(__pyx_t_9);
8469  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8470  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8471  __Pyx_GOTREF(__pyx_t_7);
8472  __Pyx_INCREF(__pyx_n_s_r);
8473  __Pyx_GIVEREF(__pyx_n_s_r);
8474  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
8475  __Pyx_INCREF(__pyx_v_ci);
8476  __Pyx_GIVEREF(__pyx_v_ci);
8477  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8478  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
8479  __Pyx_GOTREF(__pyx_t_8);
8480  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8481  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error)
8482  __Pyx_GOTREF(__pyx_t_7);
8483  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8484  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 536, __pyx_L1_error)
8485  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8486  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8487 
8488  /* "ADR.pyx":537
8489  * for i in range(len(c[('u',ci)].flat)):
8490  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8491  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
8492  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8493  * nd = self.nd
8494  */
8495  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8496  __Pyx_GOTREF(__pyx_t_7);
8497  __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
8498  __Pyx_GOTREF(__pyx_t_8);
8499  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8500  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8501  __Pyx_GOTREF(__pyx_t_7);
8502  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 537, __pyx_L1_error)
8503  __Pyx_GOTREF(__pyx_t_15);
8504  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8505  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8506  __Pyx_GOTREF(__pyx_t_7);
8507  __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8508  __Pyx_GOTREF(__pyx_t_16);
8509  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8510  __Pyx_GOTREF(__pyx_t_1);
8511  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8512  __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_15, 0, 0, &__pyx_t_7, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8513  __Pyx_GOTREF(__pyx_t_16);
8514  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8515  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8516  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8517  __pyx_t_1 = NULL;
8518  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
8519  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
8520  if (likely(__pyx_t_1)) {
8521  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8522  __Pyx_INCREF(__pyx_t_1);
8523  __Pyx_INCREF(function);
8524  __Pyx_DECREF_SET(__pyx_t_8, function);
8525  }
8526  }
8527  if (!__pyx_t_1) {
8528  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8529  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8530  __Pyx_GOTREF(__pyx_t_9);
8531  } else {
8532  #if CYTHON_FAST_PYCALL
8533  if (PyFunction_Check(__pyx_t_8)) {
8534  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_16};
8535  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8536  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8537  __Pyx_GOTREF(__pyx_t_9);
8538  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8539  } else
8540  #endif
8541  #if CYTHON_FAST_PYCCALL
8542  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
8543  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_16};
8544  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8545  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
8546  __Pyx_GOTREF(__pyx_t_9);
8547  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8548  } else
8549  #endif
8550  {
8551  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8552  __Pyx_GOTREF(__pyx_t_7);
8553  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
8554  __Pyx_GIVEREF(__pyx_t_16);
8555  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_16);
8556  __pyx_t_16 = 0;
8557  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8558  __Pyx_GOTREF(__pyx_t_9);
8559  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8560  }
8561  }
8562  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8563  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L1_error)
8564  __Pyx_GOTREF(__pyx_t_8);
8565  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8566  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8567  __Pyx_GOTREF(__pyx_t_9);
8568  __Pyx_INCREF(__pyx_n_s_a);
8569  __Pyx_GIVEREF(__pyx_n_s_a);
8570  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
8571  __Pyx_INCREF(__pyx_v_ci);
8572  __Pyx_GIVEREF(__pyx_v_ci);
8573  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
8574  __Pyx_INCREF(__pyx_v_ci);
8575  __Pyx_GIVEREF(__pyx_v_ci);
8576  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
8577  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8578  __Pyx_GOTREF(__pyx_t_7);
8579  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8580  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error)
8581  __Pyx_GOTREF(__pyx_t_9);
8582  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8583  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8584  __Pyx_GOTREF(__pyx_t_7);
8585  __pyx_t_16 = PyNumber_Multiply(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 537, __pyx_L1_error)
8586  __Pyx_GOTREF(__pyx_t_16);
8587  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8588  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8589  __Pyx_GOTREF(__pyx_t_7);
8590  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
8591  __Pyx_GOTREF(__pyx_t_1);
8592  __pyx_t_15 = PyNumber_Multiply(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 537, __pyx_L1_error)
8593  __Pyx_GOTREF(__pyx_t_15);
8594  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8595  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8596  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_8, 0, 0, &__pyx_t_16, &__pyx_t_15, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
8597  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8598  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8599  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8600  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8601 
8602  /* "ADR.pyx":535
8603  * c[('df',ci,ci)].flat[:] = 0.0
8604  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8605  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8606  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8607  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8608  */
8609  }
8610  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8611 
8612  /* "ADR.pyx":534
8613  * else:
8614  * c[('df',ci,ci)].flat[:] = 0.0
8615  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8616  * for i in range(len(c[('u',ci)].flat)):
8617  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8618  */
8619  }
8620 
8621  /* "ADR.pyx":528
8622  * nd = self.nd
8623  * for c in [cebq,cebq_global]:
8624  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8625  * if c.has_key(('df',ci,ci)):
8626  * if self.velocity != None:
8627  */
8628  }
8629  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8630 
8631  /* "ADR.pyx":527
8632  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8633  * nd = self.nd
8634  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
8635  * for ci in range(self.nc):
8636  * if c.has_key(('df',ci,ci)):
8637  */
8638  }
8639  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8640 
8641  /* "ADR.pyx":525
8642  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8643  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8644  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
8645  * nd = self.nd
8646  * for c in [cebq,cebq_global]:
8647  */
8648 
8649  /* function exit code */
8650  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8651  goto __pyx_L0;
8652  __pyx_L1_error:;
8653  __Pyx_XDECREF(__pyx_t_1);
8654  __Pyx_XDECREF(__pyx_t_2);
8655  __Pyx_XDECREF(__pyx_t_4);
8656  __Pyx_XDECREF(__pyx_t_7);
8657  __Pyx_XDECREF(__pyx_t_8);
8658  __Pyx_XDECREF(__pyx_t_9);
8659  __Pyx_XDECREF(__pyx_t_10);
8660  __Pyx_XDECREF(__pyx_t_15);
8661  __Pyx_XDECREF(__pyx_t_16);
8662  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8663  __pyx_r = NULL;
8664  __pyx_L0:;
8665  __Pyx_XDECREF(__pyx_v_nd);
8666  __Pyx_XDECREF(__pyx_v_c);
8667  __Pyx_XDECREF(__pyx_v_ci);
8668  __Pyx_XDECREF(__pyx_v_i);
8669  __Pyx_XGIVEREF(__pyx_r);
8670  __Pyx_RefNannyFinishContext();
8671  return __pyx_r;
8672 }
8673 
8674 /* "ADR.pyx":538
8675  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8676  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8677  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
8678  * nd = self.nd
8679  * for c in [cebqe]:
8680  */
8681 
8682 /* Python wrapper */
8683 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8684 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature = {"initializeGlobalExteriorElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
8685 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8686  PyObject *__pyx_v_self = 0;
8687  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
8688  PyObject *__pyx_v_cebqe = 0;
8689  PyObject *__pyx_r = 0;
8690  __Pyx_RefNannyDeclarations
8691  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature (wrapper)", 0);
8692  {
8693  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebqe,0};
8694  PyObject* values[3] = {0,0,0};
8695  if (unlikely(__pyx_kwds)) {
8696  Py_ssize_t kw_args;
8697  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8698  switch (pos_args) {
8699  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8700  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8701  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8702  case 0: break;
8703  default: goto __pyx_L5_argtuple_error;
8704  }
8705  kw_args = PyDict_Size(__pyx_kwds);
8706  switch (pos_args) {
8707  case 0:
8708  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
8709  else goto __pyx_L5_argtuple_error;
8710  case 1:
8711  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8712  else {
8713  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 1); __PYX_ERR(0, 538, __pyx_L3_error)
8714  }
8715  case 2:
8716  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cebqe)) != 0)) kw_args--;
8717  else {
8718  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 2); __PYX_ERR(0, 538, __pyx_L3_error)
8719  }
8720  }
8721  if (unlikely(kw_args > 0)) {
8722  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeGlobalExteriorElementBoundaryQuadrature") < 0)) __PYX_ERR(0, 538, __pyx_L3_error)
8723  }
8724  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
8725  goto __pyx_L5_argtuple_error;
8726  } else {
8727  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8728  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8729  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8730  }
8731  __pyx_v_self = values[0];
8732  __pyx_v_t = values[1];
8733  __pyx_v_cebqe = values[2];
8734  }
8735  goto __pyx_L4_argument_unpacking_done;
8736  __pyx_L5_argtuple_error:;
8737  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 538, __pyx_L3_error)
8738  __pyx_L3_error:;
8739  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8740  __Pyx_RefNannyFinishContext();
8741  return NULL;
8742  __pyx_L4_argument_unpacking_done:;
8743  __pyx_r = __pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebqe);
8744 
8745  /* function exit code */
8746  __Pyx_RefNannyFinishContext();
8747  return __pyx_r;
8748 }
8749 
8750 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe) {
8751  PyObject *__pyx_v_nd = NULL;
8752  PyObject *__pyx_v_c = NULL;
8753  PyObject *__pyx_v_ci = NULL;
8754  PyObject *__pyx_v_i = NULL;
8755  PyObject *__pyx_r = NULL;
8756  __Pyx_RefNannyDeclarations
8757  PyObject *__pyx_t_1 = NULL;
8758  PyObject *__pyx_t_2 = NULL;
8759  Py_ssize_t __pyx_t_3;
8760  PyObject *__pyx_t_4 = NULL;
8761  Py_ssize_t __pyx_t_5;
8762  PyObject *(*__pyx_t_6)(PyObject *);
8763  PyObject *__pyx_t_7 = NULL;
8764  PyObject *__pyx_t_8 = NULL;
8765  PyObject *__pyx_t_9 = NULL;
8766  PyObject *__pyx_t_10 = NULL;
8767  int __pyx_t_11;
8768  int __pyx_t_12;
8769  Py_ssize_t __pyx_t_13;
8770  PyObject *(*__pyx_t_14)(PyObject *);
8771  PyObject *__pyx_t_15 = NULL;
8772  PyObject *__pyx_t_16 = NULL;
8773  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature", 0);
8774 
8775  /* "ADR.pyx":539
8776  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8777  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8778  * nd = self.nd # <<<<<<<<<<<<<<
8779  * for c in [cebqe]:
8780  * for ci in range(self.nc):
8781  */
8782  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
8783  __Pyx_GOTREF(__pyx_t_1);
8784  __pyx_v_nd = __pyx_t_1;
8785  __pyx_t_1 = 0;
8786 
8787  /* "ADR.pyx":540
8788  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8789  * nd = self.nd
8790  * for c in [cebqe]: # <<<<<<<<<<<<<<
8791  * for ci in range(self.nc):
8792  * if c.has_key(('df',ci,ci)):
8793  */
8794  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
8795  __Pyx_GOTREF(__pyx_t_1);
8796  __Pyx_INCREF(__pyx_v_cebqe);
8797  __Pyx_GIVEREF(__pyx_v_cebqe);
8798  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebqe);
8799  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
8800  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8801  for (;;) {
8802  if (__pyx_t_3 >= 1) break;
8803  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8804  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error)
8805  #else
8806  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
8807  __Pyx_GOTREF(__pyx_t_1);
8808  #endif
8809  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
8810  __pyx_t_1 = 0;
8811 
8812  /* "ADR.pyx":541
8813  * nd = self.nd
8814  * for c in [cebqe]:
8815  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8816  * if c.has_key(('df',ci,ci)):
8817  * if self.velocity != None:
8818  */
8819  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8820  __Pyx_GOTREF(__pyx_t_1);
8821  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
8822  __Pyx_GOTREF(__pyx_t_4);
8823  __Pyx_GIVEREF(__pyx_t_1);
8824  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
8825  __pyx_t_1 = 0;
8826  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8827  __Pyx_GOTREF(__pyx_t_1);
8828  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8829  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
8830  __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
8831  __pyx_t_6 = NULL;
8832  } else {
8833  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
8834  __Pyx_GOTREF(__pyx_t_4);
8835  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error)
8836  }
8837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8838  for (;;) {
8839  if (likely(!__pyx_t_6)) {
8840  if (likely(PyList_CheckExact(__pyx_t_4))) {
8841  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
8842  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8843  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
8844  #else
8845  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8846  __Pyx_GOTREF(__pyx_t_1);
8847  #endif
8848  } else {
8849  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
8850  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8851  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
8852  #else
8853  __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
8854  __Pyx_GOTREF(__pyx_t_1);
8855  #endif
8856  }
8857  } else {
8858  __pyx_t_1 = __pyx_t_6(__pyx_t_4);
8859  if (unlikely(!__pyx_t_1)) {
8860  PyObject* exc_type = PyErr_Occurred();
8861  if (exc_type) {
8862  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8863  else __PYX_ERR(0, 541, __pyx_L1_error)
8864  }
8865  break;
8866  }
8867  __Pyx_GOTREF(__pyx_t_1);
8868  }
8869  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
8870  __pyx_t_1 = 0;
8871 
8872  /* "ADR.pyx":542
8873  * for c in [cebqe]:
8874  * for ci in range(self.nc):
8875  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8876  * if self.velocity != None:
8877  * c[('df',ci,ci)][...,:] = self.velocity
8878  */
8879  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error)
8880  __Pyx_GOTREF(__pyx_t_7);
8881  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L1_error)
8882  __Pyx_GOTREF(__pyx_t_8);
8883  __Pyx_INCREF(__pyx_n_s_df);
8884  __Pyx_GIVEREF(__pyx_n_s_df);
8885  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
8886  __Pyx_INCREF(__pyx_v_ci);
8887  __Pyx_GIVEREF(__pyx_v_ci);
8888  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8889  __Pyx_INCREF(__pyx_v_ci);
8890  __Pyx_GIVEREF(__pyx_v_ci);
8891  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
8892  __pyx_t_9 = NULL;
8893  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8894  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
8895  if (likely(__pyx_t_9)) {
8896  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8897  __Pyx_INCREF(__pyx_t_9);
8898  __Pyx_INCREF(function);
8899  __Pyx_DECREF_SET(__pyx_t_7, function);
8900  }
8901  }
8902  if (!__pyx_t_9) {
8903  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8904  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8905  __Pyx_GOTREF(__pyx_t_1);
8906  } else {
8907  #if CYTHON_FAST_PYCALL
8908  if (PyFunction_Check(__pyx_t_7)) {
8909  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8910  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8911  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8912  __Pyx_GOTREF(__pyx_t_1);
8913  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8914  } else
8915  #endif
8916  #if CYTHON_FAST_PYCCALL
8917  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
8918  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
8919  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8920  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8921  __Pyx_GOTREF(__pyx_t_1);
8922  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8923  } else
8924  #endif
8925  {
8926  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L1_error)
8927  __Pyx_GOTREF(__pyx_t_10);
8928  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
8929  __Pyx_GIVEREF(__pyx_t_8);
8930  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
8931  __pyx_t_8 = 0;
8932  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
8933  __Pyx_GOTREF(__pyx_t_1);
8934  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8935  }
8936  }
8937  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8938  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
8939  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8940  if (__pyx_t_11) {
8941 
8942  /* "ADR.pyx":543
8943  * for ci in range(self.nc):
8944  * if c.has_key(('df',ci,ci)):
8945  * if self.velocity != None: # <<<<<<<<<<<<<<
8946  * c[('df',ci,ci)][...,:] = self.velocity
8947  * else:
8948  */
8949  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
8950  __Pyx_GOTREF(__pyx_t_1);
8951  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error)
8952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8953  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 543, __pyx_L1_error)
8954  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8955  if (__pyx_t_11) {
8956 
8957  /* "ADR.pyx":544
8958  * if c.has_key(('df',ci,ci)):
8959  * if self.velocity != None:
8960  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
8961  * else:
8962  * c[('df',ci,ci)].flat[:] = 0.0
8963  */
8964  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error)
8965  __Pyx_GOTREF(__pyx_t_7);
8966  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
8967  __Pyx_GOTREF(__pyx_t_1);
8968  __Pyx_INCREF(__pyx_n_s_df);
8969  __Pyx_GIVEREF(__pyx_n_s_df);
8970  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
8971  __Pyx_INCREF(__pyx_v_ci);
8972  __Pyx_GIVEREF(__pyx_v_ci);
8973  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
8974  __Pyx_INCREF(__pyx_v_ci);
8975  __Pyx_GIVEREF(__pyx_v_ci);
8976  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
8977  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 544, __pyx_L1_error)
8978  __Pyx_GOTREF(__pyx_t_10);
8979  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8980  if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_tuple__12, __pyx_t_7) < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
8981  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8982  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8983 
8984  /* "ADR.pyx":543
8985  * for ci in range(self.nc):
8986  * if c.has_key(('df',ci,ci)):
8987  * if self.velocity != None: # <<<<<<<<<<<<<<
8988  * c[('df',ci,ci)][...,:] = self.velocity
8989  * else:
8990  */
8991  goto __pyx_L8;
8992  }
8993 
8994  /* "ADR.pyx":546
8995  * c[('df',ci,ci)][...,:] = self.velocity
8996  * else:
8997  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
8998  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8999  * for i in range(len(c[('u',ci)].flat)):
9000  */
9001  /*else*/ {
9002  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
9003  __Pyx_GOTREF(__pyx_t_7);
9004  __Pyx_INCREF(__pyx_n_s_df);
9005  __Pyx_GIVEREF(__pyx_n_s_df);
9006  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
9007  __Pyx_INCREF(__pyx_v_ci);
9008  __Pyx_GIVEREF(__pyx_v_ci);
9009  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9010  __Pyx_INCREF(__pyx_v_ci);
9011  __Pyx_GIVEREF(__pyx_v_ci);
9012  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
9013  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 546, __pyx_L1_error)
9014  __Pyx_GOTREF(__pyx_t_10);
9015  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9016  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
9017  __Pyx_GOTREF(__pyx_t_7);
9018  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9019  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__13, 0, 0, 1) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
9020  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9021  }
9022  __pyx_L8:;
9023 
9024  /* "ADR.pyx":542
9025  * for c in [cebqe]:
9026  * for ci in range(self.nc):
9027  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
9028  * if self.velocity != None:
9029  * c[('df',ci,ci)][...,:] = self.velocity
9030  */
9031  }
9032 
9033  /* "ADR.pyx":547
9034  * else:
9035  * c[('df',ci,ci)].flat[:] = 0.0
9036  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9037  * for i in range(len(c[('u',ci)].flat)):
9038  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9039  */
9040  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L1_error)
9041  __Pyx_GOTREF(__pyx_t_10);
9042  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
9043  __Pyx_GOTREF(__pyx_t_1);
9044  __Pyx_INCREF(__pyx_n_s_r);
9045  __Pyx_GIVEREF(__pyx_n_s_r);
9046  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
9047  __Pyx_INCREF(__pyx_v_ci);
9048  __Pyx_GIVEREF(__pyx_v_ci);
9049  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9050  __pyx_t_8 = NULL;
9051  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
9052  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
9053  if (likely(__pyx_t_8)) {
9054  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9055  __Pyx_INCREF(__pyx_t_8);
9056  __Pyx_INCREF(function);
9057  __Pyx_DECREF_SET(__pyx_t_10, function);
9058  }
9059  }
9060  if (!__pyx_t_8) {
9061  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9062  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9063  __Pyx_GOTREF(__pyx_t_7);
9064  } else {
9065  #if CYTHON_FAST_PYCALL
9066  if (PyFunction_Check(__pyx_t_10)) {
9067  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
9068  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9069  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9070  __Pyx_GOTREF(__pyx_t_7);
9071  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9072  } else
9073  #endif
9074  #if CYTHON_FAST_PYCCALL
9075  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
9076  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
9077  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9078  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9079  __Pyx_GOTREF(__pyx_t_7);
9080  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9081  } else
9082  #endif
9083  {
9084  __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
9085  __Pyx_GOTREF(__pyx_t_9);
9086  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
9087  __Pyx_GIVEREF(__pyx_t_1);
9088  PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1);
9089  __pyx_t_1 = 0;
9090  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9091  __Pyx_GOTREF(__pyx_t_7);
9092  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9093  }
9094  }
9095  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9096  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
9097  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9098  if (__pyx_t_12) {
9099  } else {
9100  __pyx_t_11 = __pyx_t_12;
9101  goto __pyx_L10_bool_binop_done;
9102  }
9103  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 547, __pyx_L1_error)
9104  __Pyx_GOTREF(__pyx_t_10);
9105  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
9106  __Pyx_GOTREF(__pyx_t_9);
9107  __Pyx_INCREF(__pyx_n_s_a);
9108  __Pyx_GIVEREF(__pyx_n_s_a);
9109  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
9110  __Pyx_INCREF(__pyx_v_ci);
9111  __Pyx_GIVEREF(__pyx_v_ci);
9112  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
9113  __Pyx_INCREF(__pyx_v_ci);
9114  __Pyx_GIVEREF(__pyx_v_ci);
9115  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
9116  __pyx_t_1 = NULL;
9117  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
9118  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
9119  if (likely(__pyx_t_1)) {
9120  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9121  __Pyx_INCREF(__pyx_t_1);
9122  __Pyx_INCREF(function);
9123  __Pyx_DECREF_SET(__pyx_t_10, function);
9124  }
9125  }
9126  if (!__pyx_t_1) {
9127  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9128  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9129  __Pyx_GOTREF(__pyx_t_7);
9130  } else {
9131  #if CYTHON_FAST_PYCALL
9132  if (PyFunction_Check(__pyx_t_10)) {
9133  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
9134  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9135  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9136  __Pyx_GOTREF(__pyx_t_7);
9137  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9138  } else
9139  #endif
9140  #if CYTHON_FAST_PYCCALL
9141  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
9142  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_9};
9143  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9144  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9145  __Pyx_GOTREF(__pyx_t_7);
9146  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9147  } else
9148  #endif
9149  {
9150  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 547, __pyx_L1_error)
9151  __Pyx_GOTREF(__pyx_t_8);
9152  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
9153  __Pyx_GIVEREF(__pyx_t_9);
9154  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
9155  __pyx_t_9 = 0;
9156  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
9157  __Pyx_GOTREF(__pyx_t_7);
9158  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9159  }
9160  }
9161  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9162  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
9163  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9164  __pyx_t_11 = __pyx_t_12;
9165  __pyx_L10_bool_binop_done:;
9166  if (__pyx_t_11) {
9167 
9168  /* "ADR.pyx":548
9169  * c[('df',ci,ci)].flat[:] = 0.0
9170  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9171  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9172  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9173  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9174  */
9175  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9176  __Pyx_GOTREF(__pyx_t_7);
9177  __Pyx_INCREF(__pyx_n_s_u);
9178  __Pyx_GIVEREF(__pyx_n_s_u);
9179  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_u);
9180  __Pyx_INCREF(__pyx_v_ci);
9181  __Pyx_GIVEREF(__pyx_v_ci);
9182  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9183  __pyx_t_10 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9184  __Pyx_GOTREF(__pyx_t_10);
9185  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9186  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9187  __Pyx_GOTREF(__pyx_t_7);
9188  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9189  __pyx_t_13 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 548, __pyx_L1_error)
9190  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9191  __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9192  __Pyx_GOTREF(__pyx_t_7);
9193  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9194  __Pyx_GOTREF(__pyx_t_10);
9195  __Pyx_GIVEREF(__pyx_t_7);
9196  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
9197  __pyx_t_7 = 0;
9198  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9199  __Pyx_GOTREF(__pyx_t_7);
9200  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9201  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
9202  __pyx_t_10 = __pyx_t_7; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
9203  __pyx_t_14 = NULL;
9204  } else {
9205  __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 548, __pyx_L1_error)
9206  __Pyx_GOTREF(__pyx_t_10);
9207  __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 548, __pyx_L1_error)
9208  }
9209  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9210  for (;;) {
9211  if (likely(!__pyx_t_14)) {
9212  if (likely(PyList_CheckExact(__pyx_t_10))) {
9213  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
9214  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9215  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
9216  #else
9217  __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9218  __Pyx_GOTREF(__pyx_t_7);
9219  #endif
9220  } else {
9221  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
9222  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9223  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
9224  #else
9225  __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
9226  __Pyx_GOTREF(__pyx_t_7);
9227  #endif
9228  }
9229  } else {
9230  __pyx_t_7 = __pyx_t_14(__pyx_t_10);
9231  if (unlikely(!__pyx_t_7)) {
9232  PyObject* exc_type = PyErr_Occurred();
9233  if (exc_type) {
9234  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9235  else __PYX_ERR(0, 548, __pyx_L1_error)
9236  }
9237  break;
9238  }
9239  __Pyx_GOTREF(__pyx_t_7);
9240  }
9241  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
9242  __pyx_t_7 = 0;
9243 
9244  /* "ADR.pyx":549
9245  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9246  * for i in range(len(c[('u',ci)].flat)):
9247  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
9248  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9249  * def evaluate(self,t,c):
9250  */
9251  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9252  __Pyx_GOTREF(__pyx_t_8);
9253  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error)
9254  __Pyx_GOTREF(__pyx_t_9);
9255  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9256  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9257  __Pyx_GOTREF(__pyx_t_8);
9258  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
9259  __Pyx_GOTREF(__pyx_t_1);
9260  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9261  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9262  __Pyx_GOTREF(__pyx_t_8);
9263  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 549, __pyx_L1_error)
9264  __Pyx_GOTREF(__pyx_t_15);
9265  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 549, __pyx_L1_error)
9266  __Pyx_GOTREF(__pyx_t_16);
9267  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9268  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_t_8, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 549, __pyx_L1_error)
9269  __Pyx_GOTREF(__pyx_t_15);
9270  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9271  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9272  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9273  __pyx_t_16 = NULL;
9274  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
9275  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
9276  if (likely(__pyx_t_16)) {
9277  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
9278  __Pyx_INCREF(__pyx_t_16);
9279  __Pyx_INCREF(function);
9280  __Pyx_DECREF_SET(__pyx_t_9, function);
9281  }
9282  }
9283  if (!__pyx_t_16) {
9284  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9285  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9286  __Pyx_GOTREF(__pyx_t_7);
9287  } else {
9288  #if CYTHON_FAST_PYCALL
9289  if (PyFunction_Check(__pyx_t_9)) {
9290  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
9291  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9292  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
9293  __Pyx_GOTREF(__pyx_t_7);
9294  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9295  } else
9296  #endif
9297  #if CYTHON_FAST_PYCCALL
9298  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
9299  PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_15};
9300  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9301  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
9302  __Pyx_GOTREF(__pyx_t_7);
9303  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9304  } else
9305  #endif
9306  {
9307  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9308  __Pyx_GOTREF(__pyx_t_8);
9309  __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_16); __pyx_t_16 = NULL;
9310  __Pyx_GIVEREF(__pyx_t_15);
9311  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_15);
9312  __pyx_t_15 = 0;
9313  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9314  __Pyx_GOTREF(__pyx_t_7);
9315  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9316  }
9317  }
9318  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9319  __pyx_t_9 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error)
9320  __Pyx_GOTREF(__pyx_t_9);
9321  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9322  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9323  __Pyx_GOTREF(__pyx_t_7);
9324  __Pyx_INCREF(__pyx_n_s_r);
9325  __Pyx_GIVEREF(__pyx_n_s_r);
9326  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
9327  __Pyx_INCREF(__pyx_v_ci);
9328  __Pyx_GIVEREF(__pyx_v_ci);
9329  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9330  __pyx_t_8 = PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
9331  __Pyx_GOTREF(__pyx_t_8);
9332  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9333  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
9334  __Pyx_GOTREF(__pyx_t_7);
9335  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9336  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 549, __pyx_L1_error)
9337  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9338  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9339 
9340  /* "ADR.pyx":550
9341  * for i in range(len(c[('u',ci)].flat)):
9342  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9343  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
9344  * def evaluate(self,t,c):
9345  * if self.timeVaryingCoefficients:
9346  */
9347  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9348  __Pyx_GOTREF(__pyx_t_7);
9349  __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 550, __pyx_L1_error)
9350  __Pyx_GOTREF(__pyx_t_8);
9351  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9352  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9353  __Pyx_GOTREF(__pyx_t_7);
9354  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 550, __pyx_L1_error)
9355  __Pyx_GOTREF(__pyx_t_15);
9356  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9357  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9358  __Pyx_GOTREF(__pyx_t_7);
9359  __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9360  __Pyx_GOTREF(__pyx_t_16);
9361  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9362  __Pyx_GOTREF(__pyx_t_1);
9363  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9364  __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_15, 0, 0, &__pyx_t_7, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9365  __Pyx_GOTREF(__pyx_t_16);
9366  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9367  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9368  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9369  __pyx_t_1 = NULL;
9370  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
9371  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
9372  if (likely(__pyx_t_1)) {
9373  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
9374  __Pyx_INCREF(__pyx_t_1);
9375  __Pyx_INCREF(function);
9376  __Pyx_DECREF_SET(__pyx_t_8, function);
9377  }
9378  }
9379  if (!__pyx_t_1) {
9380  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9381  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9382  __Pyx_GOTREF(__pyx_t_9);
9383  } else {
9384  #if CYTHON_FAST_PYCALL
9385  if (PyFunction_Check(__pyx_t_8)) {
9386  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_16};
9387  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9388  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9389  __Pyx_GOTREF(__pyx_t_9);
9390  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9391  } else
9392  #endif
9393  #if CYTHON_FAST_PYCCALL
9394  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
9395  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_16};
9396  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9397  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9398  __Pyx_GOTREF(__pyx_t_9);
9399  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9400  } else
9401  #endif
9402  {
9403  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9404  __Pyx_GOTREF(__pyx_t_7);
9405  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
9406  __Pyx_GIVEREF(__pyx_t_16);
9407  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_16);
9408  __pyx_t_16 = 0;
9409  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9410  __Pyx_GOTREF(__pyx_t_9);
9411  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9412  }
9413  }
9414  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9415  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 550, __pyx_L1_error)
9416  __Pyx_GOTREF(__pyx_t_8);
9417  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9418  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9419  __Pyx_GOTREF(__pyx_t_9);
9420  __Pyx_INCREF(__pyx_n_s_a);
9421  __Pyx_GIVEREF(__pyx_n_s_a);
9422  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
9423  __Pyx_INCREF(__pyx_v_ci);
9424  __Pyx_GIVEREF(__pyx_v_ci);
9425  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
9426  __Pyx_INCREF(__pyx_v_ci);
9427  __Pyx_GIVEREF(__pyx_v_ci);
9428  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
9429  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9430  __Pyx_GOTREF(__pyx_t_7);
9431  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9432  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 550, __pyx_L1_error)
9433  __Pyx_GOTREF(__pyx_t_9);
9434  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9435  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_7);
9437  __pyx_t_16 = PyNumber_Multiply(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 550, __pyx_L1_error)
9438  __Pyx_GOTREF(__pyx_t_16);
9439  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9440  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 550, __pyx_L1_error)
9441  __Pyx_GOTREF(__pyx_t_7);
9442  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
9443  __Pyx_GOTREF(__pyx_t_1);
9444  __pyx_t_15 = PyNumber_Multiply(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 550, __pyx_L1_error)
9445  __Pyx_GOTREF(__pyx_t_15);
9446  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9447  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9448  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_8, 0, 0, &__pyx_t_16, &__pyx_t_15, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
9449  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9450  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9451  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9452  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9453 
9454  /* "ADR.pyx":548
9455  * c[('df',ci,ci)].flat[:] = 0.0
9456  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9457  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9458  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9459  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9460  */
9461  }
9462  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9463 
9464  /* "ADR.pyx":547
9465  * else:
9466  * c[('df',ci,ci)].flat[:] = 0.0
9467  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9468  * for i in range(len(c[('u',ci)].flat)):
9469  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9470  */
9471  }
9472 
9473  /* "ADR.pyx":541
9474  * nd = self.nd
9475  * for c in [cebqe]:
9476  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9477  * if c.has_key(('df',ci,ci)):
9478  * if self.velocity != None:
9479  */
9480  }
9481  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9482 
9483  /* "ADR.pyx":540
9484  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
9485  * nd = self.nd
9486  * for c in [cebqe]: # <<<<<<<<<<<<<<
9487  * for ci in range(self.nc):
9488  * if c.has_key(('df',ci,ci)):
9489  */
9490  }
9491  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9492 
9493  /* "ADR.pyx":538
9494  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9495  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9496  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
9497  * nd = self.nd
9498  * for c in [cebqe]:
9499  */
9500 
9501  /* function exit code */
9502  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9503  goto __pyx_L0;
9504  __pyx_L1_error:;
9505  __Pyx_XDECREF(__pyx_t_1);
9506  __Pyx_XDECREF(__pyx_t_2);
9507  __Pyx_XDECREF(__pyx_t_4);
9508  __Pyx_XDECREF(__pyx_t_7);
9509  __Pyx_XDECREF(__pyx_t_8);
9510  __Pyx_XDECREF(__pyx_t_9);
9511  __Pyx_XDECREF(__pyx_t_10);
9512  __Pyx_XDECREF(__pyx_t_15);
9513  __Pyx_XDECREF(__pyx_t_16);
9514  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
9515  __pyx_r = NULL;
9516  __pyx_L0:;
9517  __Pyx_XDECREF(__pyx_v_nd);
9518  __Pyx_XDECREF(__pyx_v_c);
9519  __Pyx_XDECREF(__pyx_v_ci);
9520  __Pyx_XDECREF(__pyx_v_i);
9521  __Pyx_XGIVEREF(__pyx_r);
9522  __Pyx_RefNannyFinishContext();
9523  return __pyx_r;
9524 }
9525 
9526 /* "ADR.pyx":551
9527  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9528  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9529  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
9530  * if self.timeVaryingCoefficients:
9531  * nd = self.nd
9532  */
9533 
9534 /* Python wrapper */
9535 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9536 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_9evaluate = {"evaluate", (PyCFunction)__pyx_pw_3ADR_12Coefficients_9evaluate, METH_VARARGS|METH_KEYWORDS, 0};
9537 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9538  PyObject *__pyx_v_self = 0;
9539  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
9540  PyObject *__pyx_v_c = 0;
9541  PyObject *__pyx_r = 0;
9542  __Pyx_RefNannyDeclarations
9543  __Pyx_RefNannySetupContext("evaluate (wrapper)", 0);
9544  {
9545  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_c,0};
9546  PyObject* values[3] = {0,0,0};
9547  if (unlikely(__pyx_kwds)) {
9548  Py_ssize_t kw_args;
9549  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9550  switch (pos_args) {
9551  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9552  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9553  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9554  case 0: break;
9555  default: goto __pyx_L5_argtuple_error;
9556  }
9557  kw_args = PyDict_Size(__pyx_kwds);
9558  switch (pos_args) {
9559  case 0:
9560  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
9561  else goto __pyx_L5_argtuple_error;
9562  case 1:
9563  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9564  else {
9565  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 1); __PYX_ERR(0, 551, __pyx_L3_error)
9566  }
9567  case 2:
9568  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
9569  else {
9570  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 2); __PYX_ERR(0, 551, __pyx_L3_error)
9571  }
9572  }
9573  if (unlikely(kw_args > 0)) {
9574  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluate") < 0)) __PYX_ERR(0, 551, __pyx_L3_error)
9575  }
9576  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9577  goto __pyx_L5_argtuple_error;
9578  } else {
9579  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9580  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9581  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9582  }
9583  __pyx_v_self = values[0];
9584  __pyx_v_t = values[1];
9585  __pyx_v_c = values[2];
9586  }
9587  goto __pyx_L4_argument_unpacking_done;
9588  __pyx_L5_argtuple_error:;
9589  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 551, __pyx_L3_error)
9590  __pyx_L3_error:;
9591  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
9592  __Pyx_RefNannyFinishContext();
9593  return NULL;
9594  __pyx_L4_argument_unpacking_done:;
9595  __pyx_r = __pyx_pf_3ADR_12Coefficients_8evaluate(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_c);
9596 
9597  /* function exit code */
9598  __Pyx_RefNannyFinishContext();
9599  return __pyx_r;
9600 }
9601 
9602 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c) {
9603  PyObject *__pyx_v_nd = NULL;
9604  PyObject *__pyx_v_ci = NULL;
9605  PyObject *__pyx_v_i = NULL;
9606  PyObject *__pyx_r = NULL;
9607  __Pyx_RefNannyDeclarations
9608  PyObject *__pyx_t_1 = NULL;
9609  int __pyx_t_2;
9610  PyObject *__pyx_t_3 = NULL;
9611  Py_ssize_t __pyx_t_4;
9612  PyObject *(*__pyx_t_5)(PyObject *);
9613  PyObject *__pyx_t_6 = NULL;
9614  PyObject *__pyx_t_7 = NULL;
9615  Py_ssize_t __pyx_t_8;
9616  PyObject *(*__pyx_t_9)(PyObject *);
9617  PyObject *__pyx_t_10 = NULL;
9618  PyObject *__pyx_t_11 = NULL;
9619  PyObject *__pyx_t_12 = NULL;
9620  PyObject *__pyx_t_13 = NULL;
9621  __Pyx_RefNannySetupContext("evaluate", 0);
9622 
9623  /* "ADR.pyx":552
9624  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9625  * def evaluate(self,t,c):
9626  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
9627  * nd = self.nd
9628  * for ci in range(self.nc):
9629  */
9630  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
9631  __Pyx_GOTREF(__pyx_t_1);
9632  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
9633  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9634  if (__pyx_t_2) {
9635 
9636  /* "ADR.pyx":553
9637  * def evaluate(self,t,c):
9638  * if self.timeVaryingCoefficients:
9639  * nd = self.nd # <<<<<<<<<<<<<<
9640  * for ci in range(self.nc):
9641  * if self.velocity != None:
9642  */
9643  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
9644  __Pyx_GOTREF(__pyx_t_1);
9645  __pyx_v_nd = __pyx_t_1;
9646  __pyx_t_1 = 0;
9647 
9648  /* "ADR.pyx":554
9649  * if self.timeVaryingCoefficients:
9650  * nd = self.nd
9651  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9652  * if self.velocity != None:
9653  * c[('df',ci,ci)][...,:] = self.velocity
9654  */
9655  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9656  __Pyx_GOTREF(__pyx_t_1);
9657  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
9658  __Pyx_GOTREF(__pyx_t_3);
9659  __Pyx_GIVEREF(__pyx_t_1);
9660  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
9661  __pyx_t_1 = 0;
9662  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9663  __Pyx_GOTREF(__pyx_t_1);
9664  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9665  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
9666  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
9667  __pyx_t_5 = NULL;
9668  } else {
9669  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
9670  __Pyx_GOTREF(__pyx_t_3);
9671  __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 554, __pyx_L1_error)
9672  }
9673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9674  for (;;) {
9675  if (likely(!__pyx_t_5)) {
9676  if (likely(PyList_CheckExact(__pyx_t_3))) {
9677  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
9678  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9679  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
9680  #else
9681  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9682  __Pyx_GOTREF(__pyx_t_1);
9683  #endif
9684  } else {
9685  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
9686  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9687  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
9688  #else
9689  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
9690  __Pyx_GOTREF(__pyx_t_1);
9691  #endif
9692  }
9693  } else {
9694  __pyx_t_1 = __pyx_t_5(__pyx_t_3);
9695  if (unlikely(!__pyx_t_1)) {
9696  PyObject* exc_type = PyErr_Occurred();
9697  if (exc_type) {
9698  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9699  else __PYX_ERR(0, 554, __pyx_L1_error)
9700  }
9701  break;
9702  }
9703  __Pyx_GOTREF(__pyx_t_1);
9704  }
9705  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
9706  __pyx_t_1 = 0;
9707 
9708  /* "ADR.pyx":555
9709  * nd = self.nd
9710  * for ci in range(self.nc):
9711  * if self.velocity != None: # <<<<<<<<<<<<<<
9712  * c[('df',ci,ci)][...,:] = self.velocity
9713  * else:
9714  */
9715  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
9716  __Pyx_GOTREF(__pyx_t_1);
9717  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error)
9718  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9719  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 555, __pyx_L1_error)
9720  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9721  if (__pyx_t_2) {
9722 
9723  /* "ADR.pyx":556
9724  * for ci in range(self.nc):
9725  * if self.velocity != None:
9726  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
9727  * else:
9728  * c[('df',ci,ci)].flat[:] = 0.0
9729  */
9730  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 556, __pyx_L1_error)
9731  __Pyx_GOTREF(__pyx_t_6);
9732  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
9733  __Pyx_GOTREF(__pyx_t_1);
9734  __Pyx_INCREF(__pyx_n_s_df);
9735  __Pyx_GIVEREF(__pyx_n_s_df);
9736  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_df);
9737  __Pyx_INCREF(__pyx_v_ci);
9738  __Pyx_GIVEREF(__pyx_v_ci);
9739  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
9740  __Pyx_INCREF(__pyx_v_ci);
9741  __Pyx_GIVEREF(__pyx_v_ci);
9742  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
9743  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 556, __pyx_L1_error)
9744  __Pyx_GOTREF(__pyx_t_7);
9745  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9746  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__15, __pyx_t_6) < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
9747  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9748  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9749 
9750  /* "ADR.pyx":555
9751  * nd = self.nd
9752  * for ci in range(self.nc):
9753  * if self.velocity != None: # <<<<<<<<<<<<<<
9754  * c[('df',ci,ci)][...,:] = self.velocity
9755  * else:
9756  */
9757  goto __pyx_L6;
9758  }
9759 
9760  /* "ADR.pyx":558
9761  * c[('df',ci,ci)][...,:] = self.velocity
9762  * else:
9763  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
9764  * for i in range(len(c[('r',ci)].flat)):
9765  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9766  */
9767  /*else*/ {
9768  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
9769  __Pyx_GOTREF(__pyx_t_6);
9770  __Pyx_INCREF(__pyx_n_s_df);
9771  __Pyx_GIVEREF(__pyx_n_s_df);
9772  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_df);
9773  __Pyx_INCREF(__pyx_v_ci);
9774  __Pyx_GIVEREF(__pyx_v_ci);
9775  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
9776  __Pyx_INCREF(__pyx_v_ci);
9777  __Pyx_GIVEREF(__pyx_v_ci);
9778  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
9779  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 558, __pyx_L1_error)
9780  __Pyx_GOTREF(__pyx_t_7);
9781  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9782  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
9783  __Pyx_GOTREF(__pyx_t_6);
9784  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9785  if (__Pyx_PyObject_SetSlice(__pyx_t_6, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__16, 0, 0, 1) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
9786  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9787  }
9788  __pyx_L6:;
9789 
9790  /* "ADR.pyx":559
9791  * else:
9792  * c[('df',ci,ci)].flat[:] = 0.0
9793  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
9794  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9795  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9796  */
9797  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9798  __Pyx_GOTREF(__pyx_t_6);
9799  __Pyx_INCREF(__pyx_n_s_r);
9800  __Pyx_GIVEREF(__pyx_n_s_r);
9801  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_r);
9802  __Pyx_INCREF(__pyx_v_ci);
9803  __Pyx_GIVEREF(__pyx_v_ci);
9804  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
9805  __pyx_t_7 = PyObject_GetItem(__pyx_v_c, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L1_error)
9806  __Pyx_GOTREF(__pyx_t_7);
9807  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9808  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9809  __Pyx_GOTREF(__pyx_t_6);
9810  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9811  __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 559, __pyx_L1_error)
9812  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9813  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9814  __Pyx_GOTREF(__pyx_t_6);
9815  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L1_error)
9816  __Pyx_GOTREF(__pyx_t_7);
9817  __Pyx_GIVEREF(__pyx_t_6);
9818  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
9819  __pyx_t_6 = 0;
9820  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9821  __Pyx_GOTREF(__pyx_t_6);
9822  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9823  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
9824  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
9825  __pyx_t_9 = NULL;
9826  } else {
9827  __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L1_error)
9828  __Pyx_GOTREF(__pyx_t_7);
9829  __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 559, __pyx_L1_error)
9830  }
9831  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9832  for (;;) {
9833  if (likely(!__pyx_t_9)) {
9834  if (likely(PyList_CheckExact(__pyx_t_7))) {
9835  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
9836  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9837  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
9838  #else
9839  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9840  __Pyx_GOTREF(__pyx_t_6);
9841  #endif
9842  } else {
9843  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
9844  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9845  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
9846  #else
9847  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
9848  __Pyx_GOTREF(__pyx_t_6);
9849  #endif
9850  }
9851  } else {
9852  __pyx_t_6 = __pyx_t_9(__pyx_t_7);
9853  if (unlikely(!__pyx_t_6)) {
9854  PyObject* exc_type = PyErr_Occurred();
9855  if (exc_type) {
9856  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9857  else __PYX_ERR(0, 559, __pyx_L1_error)
9858  }
9859  break;
9860  }
9861  __Pyx_GOTREF(__pyx_t_6);
9862  }
9863  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
9864  __pyx_t_6 = 0;
9865 
9866  /* "ADR.pyx":560
9867  * c[('df',ci,ci)].flat[:] = 0.0
9868  * for i in range(len(c[('r',ci)].flat)):
9869  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
9870  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9871  *
9872  */
9873  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9874  __Pyx_GOTREF(__pyx_t_1);
9875  __pyx_t_10 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 560, __pyx_L1_error)
9876  __Pyx_GOTREF(__pyx_t_10);
9877  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9878  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9879  __Pyx_GOTREF(__pyx_t_1);
9880  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 560, __pyx_L1_error)
9881  __Pyx_GOTREF(__pyx_t_11);
9882  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9883  __pyx_t_1 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9884  __Pyx_GOTREF(__pyx_t_1);
9885  __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 560, __pyx_L1_error)
9886  __Pyx_GOTREF(__pyx_t_12);
9887  __pyx_t_13 = PyNumber_Multiply(__pyx_int_3, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 560, __pyx_L1_error)
9888  __Pyx_GOTREF(__pyx_t_13);
9889  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9890  __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_t_11, 0, 0, &__pyx_t_1, &__pyx_t_13, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 560, __pyx_L1_error)
9891  __Pyx_GOTREF(__pyx_t_12);
9892  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9893  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9894  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9895  __pyx_t_13 = NULL;
9896  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
9897  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
9898  if (likely(__pyx_t_13)) {
9899  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
9900  __Pyx_INCREF(__pyx_t_13);
9901  __Pyx_INCREF(function);
9902  __Pyx_DECREF_SET(__pyx_t_10, function);
9903  }
9904  }
9905  if (!__pyx_t_13) {
9906  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9907  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9908  __Pyx_GOTREF(__pyx_t_6);
9909  } else {
9910  #if CYTHON_FAST_PYCALL
9911  if (PyFunction_Check(__pyx_t_10)) {
9912  PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
9913  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9914  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
9915  __Pyx_GOTREF(__pyx_t_6);
9916  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9917  } else
9918  #endif
9919  #if CYTHON_FAST_PYCCALL
9920  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
9921  PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
9922  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9923  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
9924  __Pyx_GOTREF(__pyx_t_6);
9925  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9926  } else
9927  #endif
9928  {
9929  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9930  __Pyx_GOTREF(__pyx_t_1);
9931  __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13); __pyx_t_13 = NULL;
9932  __Pyx_GIVEREF(__pyx_t_12);
9933  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_12);
9934  __pyx_t_12 = 0;
9935  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9936  __Pyx_GOTREF(__pyx_t_6);
9937  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9938  }
9939  }
9940  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9941  __pyx_t_10 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 560, __pyx_L1_error)
9942  __Pyx_GOTREF(__pyx_t_10);
9943  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9944  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9945  __Pyx_GOTREF(__pyx_t_6);
9946  __Pyx_INCREF(__pyx_n_s_r);
9947  __Pyx_GIVEREF(__pyx_n_s_r);
9948  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_r);
9949  __Pyx_INCREF(__pyx_v_ci);
9950  __Pyx_GIVEREF(__pyx_v_ci);
9951  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
9952  __pyx_t_1 = PyObject_GetItem(__pyx_v_c, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
9953  __Pyx_GOTREF(__pyx_t_1);
9954  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9955  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9956  __Pyx_GOTREF(__pyx_t_6);
9957  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9958  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_i, __pyx_t_10) < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
9959  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9960  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9961 
9962  /* "ADR.pyx":561
9963  * for i in range(len(c[('r',ci)].flat)):
9964  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9965  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
9966  *
9967  * class LevelModel(proteus.Transport.OneLevelTransport):
9968  */
9969  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
9970  __Pyx_GOTREF(__pyx_t_6);
9971  __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
9972  __Pyx_GOTREF(__pyx_t_1);
9973  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9974  __pyx_t_6 = PyObject_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
9975  __Pyx_GOTREF(__pyx_t_6);
9976  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
9977  __Pyx_GOTREF(__pyx_t_12);
9978  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9979  __pyx_t_6 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
9980  __Pyx_GOTREF(__pyx_t_6);
9981  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 561, __pyx_L1_error)
9982  __Pyx_GOTREF(__pyx_t_13);
9983  __pyx_t_11 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
9984  __Pyx_GOTREF(__pyx_t_11);
9985  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9986  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, &__pyx_t_6, &__pyx_t_11, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 561, __pyx_L1_error)
9987  __Pyx_GOTREF(__pyx_t_13);
9988  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9989  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9990  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9991  __pyx_t_11 = NULL;
9992  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
9993  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
9994  if (likely(__pyx_t_11)) {
9995  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
9996  __Pyx_INCREF(__pyx_t_11);
9997  __Pyx_INCREF(function);
9998  __Pyx_DECREF_SET(__pyx_t_1, function);
9999  }
10000  }
10001  if (!__pyx_t_11) {
10002  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10003  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10004  __Pyx_GOTREF(__pyx_t_10);
10005  } else {
10006  #if CYTHON_FAST_PYCALL
10007  if (PyFunction_Check(__pyx_t_1)) {
10008  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_13};
10009  __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10010  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
10011  __Pyx_GOTREF(__pyx_t_10);
10012  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10013  } else
10014  #endif
10015  #if CYTHON_FAST_PYCCALL
10016  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
10017  PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_13};
10018  __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10019  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
10020  __Pyx_GOTREF(__pyx_t_10);
10021  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10022  } else
10023  #endif
10024  {
10025  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
10026  __Pyx_GOTREF(__pyx_t_6);
10027  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
10028  __Pyx_GIVEREF(__pyx_t_13);
10029  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_13);
10030  __pyx_t_13 = 0;
10031  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10032  __Pyx_GOTREF(__pyx_t_10);
10033  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10034  }
10035  }
10036  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10037  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
10038  __Pyx_GOTREF(__pyx_t_1);
10039  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10040  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10041  __Pyx_GOTREF(__pyx_t_10);
10042  __Pyx_INCREF(__pyx_n_s_a);
10043  __Pyx_GIVEREF(__pyx_n_s_a);
10044  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_s_a);
10045  __Pyx_INCREF(__pyx_v_ci);
10046  __Pyx_GIVEREF(__pyx_v_ci);
10047  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_ci);
10048  __Pyx_INCREF(__pyx_v_ci);
10049  __Pyx_GIVEREF(__pyx_v_ci);
10050  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_ci);
10051  __pyx_t_6 = PyObject_GetItem(__pyx_v_c, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
10052  __Pyx_GOTREF(__pyx_t_6);
10053  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10054  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L1_error)
10055  __Pyx_GOTREF(__pyx_t_10);
10056  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10057  __pyx_t_6 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
10058  __Pyx_GOTREF(__pyx_t_6);
10059  __pyx_t_13 = PyNumber_Multiply(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 561, __pyx_L1_error)
10060  __Pyx_GOTREF(__pyx_t_13);
10061  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10062  __pyx_t_6 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
10063  __Pyx_GOTREF(__pyx_t_6);
10064  __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 561, __pyx_L1_error)
10065  __Pyx_GOTREF(__pyx_t_11);
10066  __pyx_t_12 = PyNumber_Multiply(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
10067  __Pyx_GOTREF(__pyx_t_12);
10068  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10069  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10070  if (__Pyx_PyObject_SetSlice(__pyx_t_10, __pyx_t_1, 0, 0, &__pyx_t_13, &__pyx_t_12, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 561, __pyx_L1_error)
10071  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10072  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10073  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10074  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10075 
10076  /* "ADR.pyx":559
10077  * else:
10078  * c[('df',ci,ci)].flat[:] = 0.0
10079  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
10080  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10081  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10082  */
10083  }
10084  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10085 
10086  /* "ADR.pyx":554
10087  * if self.timeVaryingCoefficients:
10088  * nd = self.nd
10089  * for ci in range(self.nc): # <<<<<<<<<<<<<<
10090  * if self.velocity != None:
10091  * c[('df',ci,ci)][...,:] = self.velocity
10092  */
10093  }
10094  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10095 
10096  /* "ADR.pyx":552
10097  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10098  * def evaluate(self,t,c):
10099  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
10100  * nd = self.nd
10101  * for ci in range(self.nc):
10102  */
10103  }
10104 
10105  /* "ADR.pyx":551
10106  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10107  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10108  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
10109  * if self.timeVaryingCoefficients:
10110  * nd = self.nd
10111  */
10112 
10113  /* function exit code */
10114  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10115  goto __pyx_L0;
10116  __pyx_L1_error:;
10117  __Pyx_XDECREF(__pyx_t_1);
10118  __Pyx_XDECREF(__pyx_t_3);
10119  __Pyx_XDECREF(__pyx_t_6);
10120  __Pyx_XDECREF(__pyx_t_7);
10121  __Pyx_XDECREF(__pyx_t_10);
10122  __Pyx_XDECREF(__pyx_t_11);
10123  __Pyx_XDECREF(__pyx_t_12);
10124  __Pyx_XDECREF(__pyx_t_13);
10125  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
10126  __pyx_r = NULL;
10127  __pyx_L0:;
10128  __Pyx_XDECREF(__pyx_v_nd);
10129  __Pyx_XDECREF(__pyx_v_ci);
10130  __Pyx_XDECREF(__pyx_v_i);
10131  __Pyx_XGIVEREF(__pyx_r);
10132  __Pyx_RefNannyFinishContext();
10133  return __pyx_r;
10134 }
10135 
10136 /* "ADR.pyx":571
10137  * """
10138  * nCalls=0
10139  * def __init__(self, # <<<<<<<<<<<<<<
10140  * uDict,
10141  * phiDict,
10142  */
10143 
10144 /* Python wrapper */
10145 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10146 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_1__init__ = {"__init__", (PyCFunction)__pyx_pw_3ADR_10LevelModel_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
10147 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10148  PyObject *__pyx_v_self = 0;
10149  PyObject *__pyx_v_uDict = 0;
10150  PyObject *__pyx_v_phiDict = 0;
10151  PyObject *__pyx_v_testSpaceDict = 0;
10152  PyObject *__pyx_v_matType = 0;
10153  PyObject *__pyx_v_dofBoundaryConditionsDict = 0;
10154  PyObject *__pyx_v_dofBoundaryConditionsSetterDict = 0;
10155  PyObject *__pyx_v_coefficients = 0;
10156  PyObject *__pyx_v_elementQuadrature = 0;
10157  PyObject *__pyx_v_elementBoundaryQuadrature = 0;
10158  PyObject *__pyx_v_fluxBoundaryConditionsDict = 0;
10159  PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict = 0;
10160  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = 0;
10161  CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict = 0;
10162  PyObject *__pyx_v_stabilization = 0;
10163  PyObject *__pyx_v_shockCapturing = 0;
10164  PyObject *__pyx_v_conservativeFluxDict = 0;
10165  PyObject *__pyx_v_numericalFluxType = 0;
10166  PyObject *__pyx_v_TimeIntegrationClass = 0;
10167  PyObject *__pyx_v_massLumping = 0;
10168  PyObject *__pyx_v_reactionLumping = 0;
10169  PyObject *__pyx_v_options = 0;
10170  PyObject *__pyx_v_name = 0;
10171  PyObject *__pyx_v_reuse_trial_and_test_quadrature = 0;
10172  PyObject *__pyx_v_sd = 0;
10173  PyObject *__pyx_v_movingDomain = 0;
10174  PyObject *__pyx_r = 0;
10175  __Pyx_RefNannyDeclarations
10176  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
10177  {
10178  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_uDict,&__pyx_n_s_phiDict,&__pyx_n_s_testSpaceDict,&__pyx_n_s_matType,&__pyx_n_s_dofBoundaryConditionsDict,&__pyx_n_s_dofBoundaryConditionsSetterDict,&__pyx_n_s_coefficients,&__pyx_n_s_elementQuadrature,&__pyx_n_s_elementBoundaryQuadrature,&__pyx_n_s_fluxBoundaryConditionsDict,&__pyx_n_s_advectiveFluxBoundaryConditionsS,&__pyx_n_s_diffusiveFluxBoundaryConditionsS,&__pyx_n_s_stressTraceBoundaryConditionsSet,&__pyx_n_s_stabilization,&__pyx_n_s_shockCapturing,&__pyx_n_s_conservativeFluxDict,&__pyx_n_s_numericalFluxType,&__pyx_n_s_TimeIntegrationClass,&__pyx_n_s_massLumping,&__pyx_n_s_reactionLumping,&__pyx_n_s_options,&__pyx_n_s_name,&__pyx_n_s_reuse_trial_and_test_quadrature,&__pyx_n_s_sd,&__pyx_n_s_movingDomain,0};
10179  PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
10180 
10181  /* "ADR.pyx":581
10182  * elementQuadrature,
10183  * elementBoundaryQuadrature,
10184  * fluxBoundaryConditionsDict=None, # <<<<<<<<<<<<<<
10185  * advectiveFluxBoundaryConditionsSetterDict=None,
10186  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10187  */
10188  values[10] = ((PyObject *)((PyObject *)Py_None));
10189 
10190  /* "ADR.pyx":582
10191  * elementBoundaryQuadrature,
10192  * fluxBoundaryConditionsDict=None,
10193  * advectiveFluxBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10194  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10195  * stressTraceBoundaryConditionsSetterDict=None,
10196  */
10197  values[11] = ((PyObject *)((PyObject *)Py_None));
10198 
10199  /* "ADR.pyx":583
10200  * fluxBoundaryConditionsDict=None,
10201  * advectiveFluxBoundaryConditionsSetterDict=None,
10202  * diffusiveFluxBoundaryConditionsSetterDictDict=None, # <<<<<<<<<<<<<<
10203  * stressTraceBoundaryConditionsSetterDict=None,
10204  * stabilization=None,
10205  */
10206  values[12] = ((PyObject *)((PyObject *)Py_None));
10207 
10208  /* "ADR.pyx":584
10209  * advectiveFluxBoundaryConditionsSetterDict=None,
10210  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10211  * stressTraceBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10212  * stabilization=None,
10213  * shockCapturing=None,
10214  */
10215  values[13] = ((PyObject *)((PyObject *)Py_None));
10216 
10217  /* "ADR.pyx":585
10218  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10219  * stressTraceBoundaryConditionsSetterDict=None,
10220  * stabilization=None, # <<<<<<<<<<<<<<
10221  * shockCapturing=None,
10222  * conservativeFluxDict=None,
10223  */
10224  values[14] = ((PyObject *)((PyObject *)Py_None));
10225 
10226  /* "ADR.pyx":586
10227  * stressTraceBoundaryConditionsSetterDict=None,
10228  * stabilization=None,
10229  * shockCapturing=None, # <<<<<<<<<<<<<<
10230  * conservativeFluxDict=None,
10231  * numericalFluxType=None,
10232  */
10233  values[15] = ((PyObject *)((PyObject *)Py_None));
10234 
10235  /* "ADR.pyx":587
10236  * stabilization=None,
10237  * shockCapturing=None,
10238  * conservativeFluxDict=None, # <<<<<<<<<<<<<<
10239  * numericalFluxType=None,
10240  * TimeIntegrationClass=None,
10241  */
10242  values[16] = ((PyObject *)((PyObject *)Py_None));
10243 
10244  /* "ADR.pyx":588
10245  * shockCapturing=None,
10246  * conservativeFluxDict=None,
10247  * numericalFluxType=None, # <<<<<<<<<<<<<<
10248  * TimeIntegrationClass=None,
10249  * massLumping=False,
10250  */
10251  values[17] = ((PyObject *)((PyObject *)Py_None));
10252 
10253  /* "ADR.pyx":589
10254  * conservativeFluxDict=None,
10255  * numericalFluxType=None,
10256  * TimeIntegrationClass=None, # <<<<<<<<<<<<<<
10257  * massLumping=False,
10258  * reactionLumping=False,
10259  */
10260  values[18] = ((PyObject *)((PyObject *)Py_None));
10261 
10262  /* "ADR.pyx":590
10263  * numericalFluxType=None,
10264  * TimeIntegrationClass=None,
10265  * massLumping=False, # <<<<<<<<<<<<<<
10266  * reactionLumping=False,
10267  * options=None,
10268  */
10269  values[19] = ((PyObject *)((PyObject *)Py_False));
10270 
10271  /* "ADR.pyx":591
10272  * TimeIntegrationClass=None,
10273  * massLumping=False,
10274  * reactionLumping=False, # <<<<<<<<<<<<<<
10275  * options=None,
10276  * name='defaultName',
10277  */
10278  values[20] = ((PyObject *)((PyObject *)Py_False));
10279 
10280  /* "ADR.pyx":592
10281  * massLumping=False,
10282  * reactionLumping=False,
10283  * options=None, # <<<<<<<<<<<<<<
10284  * name='defaultName',
10285  * reuse_trial_and_test_quadrature=True,
10286  */
10287  values[21] = ((PyObject *)((PyObject *)Py_None));
10288  values[22] = ((PyObject *)((PyObject*)__pyx_n_s_defaultName));
10289 
10290  /* "ADR.pyx":594
10291  * options=None,
10292  * name='defaultName',
10293  * reuse_trial_and_test_quadrature=True, # <<<<<<<<<<<<<<
10294  * sd = True,
10295  * movingDomain=False):#,
10296  */
10297  values[23] = ((PyObject *)((PyObject *)Py_True));
10298 
10299  /* "ADR.pyx":595
10300  * name='defaultName',
10301  * reuse_trial_and_test_quadrature=True,
10302  * sd = True, # <<<<<<<<<<<<<<
10303  * movingDomain=False):#,
10304  * from proteus import Comm
10305  */
10306  values[24] = ((PyObject *)((PyObject *)Py_True));
10307 
10308  /* "ADR.pyx":596
10309  * reuse_trial_and_test_quadrature=True,
10310  * sd = True,
10311  * movingDomain=False):#, # <<<<<<<<<<<<<<
10312  * from proteus import Comm
10313  * #
10314  */
10315  values[25] = ((PyObject *)((PyObject *)Py_False));
10316  if (unlikely(__pyx_kwds)) {
10317  Py_ssize_t kw_args;
10318  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10319  switch (pos_args) {
10320  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10321  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10322  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10323  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10324  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10325  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10326  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10327  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10328  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10329  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10330  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10331  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10332  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10333  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10334  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10335  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10336  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10337  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10338  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10339  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10340  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10341  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10342  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10343  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10344  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10345  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10346  case 0: break;
10347  default: goto __pyx_L5_argtuple_error;
10348  }
10349  kw_args = PyDict_Size(__pyx_kwds);
10350  switch (pos_args) {
10351  case 0:
10352  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
10353  else goto __pyx_L5_argtuple_error;
10354  case 1:
10355  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_uDict)) != 0)) kw_args--;
10356  else {
10357  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 1); __PYX_ERR(0, 571, __pyx_L3_error)
10358  }
10359  case 2:
10360  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_phiDict)) != 0)) kw_args--;
10361  else {
10362  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 2); __PYX_ERR(0, 571, __pyx_L3_error)
10363  }
10364  case 3:
10365  if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_testSpaceDict)) != 0)) kw_args--;
10366  else {
10367  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 3); __PYX_ERR(0, 571, __pyx_L3_error)
10368  }
10369  case 4:
10370  if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
10371  else {
10372  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 4); __PYX_ERR(0, 571, __pyx_L3_error)
10373  }
10374  case 5:
10375  if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsDict)) != 0)) kw_args--;
10376  else {
10377  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 5); __PYX_ERR(0, 571, __pyx_L3_error)
10378  }
10379  case 6:
10380  if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsSetterDict)) != 0)) kw_args--;
10381  else {
10382  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 6); __PYX_ERR(0, 571, __pyx_L3_error)
10383  }
10384  case 7:
10385  if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
10386  else {
10387  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 7); __PYX_ERR(0, 571, __pyx_L3_error)
10388  }
10389  case 8:
10390  if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementQuadrature)) != 0)) kw_args--;
10391  else {
10392  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 8); __PYX_ERR(0, 571, __pyx_L3_error)
10393  }
10394  case 9:
10395  if (likely((values[9] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elementBoundaryQuadrature)) != 0)) kw_args--;
10396  else {
10397  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 9); __PYX_ERR(0, 571, __pyx_L3_error)
10398  }
10399  case 10:
10400  if (kw_args > 0) {
10401  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fluxBoundaryConditionsDict);
10402  if (value) { values[10] = value; kw_args--; }
10403  }
10404  case 11:
10405  if (kw_args > 0) {
10406  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_advectiveFluxBoundaryConditionsS);
10407  if (value) { values[11] = value; kw_args--; }
10408  }
10409  case 12:
10410  if (kw_args > 0) {
10411  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_diffusiveFluxBoundaryConditionsS);
10412  if (value) { values[12] = value; kw_args--; }
10413  }
10414  case 13:
10415  if (kw_args > 0) {
10416  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stressTraceBoundaryConditionsSet);
10417  if (value) { values[13] = value; kw_args--; }
10418  }
10419  case 14:
10420  if (kw_args > 0) {
10421  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stabilization);
10422  if (value) { values[14] = value; kw_args--; }
10423  }
10424  case 15:
10425  if (kw_args > 0) {
10426  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shockCapturing);
10427  if (value) { values[15] = value; kw_args--; }
10428  }
10429  case 16:
10430  if (kw_args > 0) {
10431  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conservativeFluxDict);
10432  if (value) { values[16] = value; kw_args--; }
10433  }
10434  case 17:
10435  if (kw_args > 0) {
10436  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_numericalFluxType);
10437  if (value) { values[17] = value; kw_args--; }
10438  }
10439  case 18:
10440  if (kw_args > 0) {
10441  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_TimeIntegrationClass);
10442  if (value) { values[18] = value; kw_args--; }
10443  }
10444  case 19:
10445  if (kw_args > 0) {
10446  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_massLumping);
10447  if (value) { values[19] = value; kw_args--; }
10448  }
10449  case 20:
10450  if (kw_args > 0) {
10451  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reactionLumping);
10452  if (value) { values[20] = value; kw_args--; }
10453  }
10454  case 21:
10455  if (kw_args > 0) {
10456  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_options);
10457  if (value) { values[21] = value; kw_args--; }
10458  }
10459  case 22:
10460  if (kw_args > 0) {
10461  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
10462  if (value) { values[22] = value; kw_args--; }
10463  }
10464  case 23:
10465  if (kw_args > 0) {
10466  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reuse_trial_and_test_quadrature);
10467  if (value) { values[23] = value; kw_args--; }
10468  }
10469  case 24:
10470  if (kw_args > 0) {
10471  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sd);
10472  if (value) { values[24] = value; kw_args--; }
10473  }
10474  case 25:
10475  if (kw_args > 0) {
10476  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_movingDomain);
10477  if (value) { values[25] = value; kw_args--; }
10478  }
10479  }
10480  if (unlikely(kw_args > 0)) {
10481  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 571, __pyx_L3_error)
10482  }
10483  } else {
10484  switch (PyTuple_GET_SIZE(__pyx_args)) {
10485  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10486  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10487  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10488  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10489  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10490  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10491  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10492  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10493  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10494  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10495  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10496  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10497  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10498  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10499  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10500  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10501  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10502  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10503  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10504  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10505  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10506  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10507  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10508  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10509  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10510  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10511  break;
10512  default: goto __pyx_L5_argtuple_error;
10513  }
10514  }
10515  __pyx_v_self = values[0];
10516  __pyx_v_uDict = values[1];
10517  __pyx_v_phiDict = values[2];
10518  __pyx_v_testSpaceDict = values[3];
10519  __pyx_v_matType = values[4];
10520  __pyx_v_dofBoundaryConditionsDict = values[5];
10521  __pyx_v_dofBoundaryConditionsSetterDict = values[6];
10522  __pyx_v_coefficients = values[7];
10523  __pyx_v_elementQuadrature = values[8];
10524  __pyx_v_elementBoundaryQuadrature = values[9];
10525  __pyx_v_fluxBoundaryConditionsDict = values[10];
10526  __pyx_v_advectiveFluxBoundaryConditionsSetterDict = values[11];
10527  __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = values[12];
10528  __pyx_v_stressTraceBoundaryConditionsSetterDict = values[13];
10529  __pyx_v_stabilization = values[14];
10530  __pyx_v_shockCapturing = values[15];
10531  __pyx_v_conservativeFluxDict = values[16];
10532  __pyx_v_numericalFluxType = values[17];
10533  __pyx_v_TimeIntegrationClass = values[18];
10534  __pyx_v_massLumping = values[19];
10535  __pyx_v_reactionLumping = values[20];
10536  __pyx_v_options = values[21];
10537  __pyx_v_name = values[22];
10538  __pyx_v_reuse_trial_and_test_quadrature = values[23];
10539  __pyx_v_sd = values[24];
10540  __pyx_v_movingDomain = values[25];
10541  }
10542  goto __pyx_L4_argument_unpacking_done;
10543  __pyx_L5_argtuple_error:;
10544  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 571, __pyx_L3_error)
10545  __pyx_L3_error:;
10546  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10547  __Pyx_RefNannyFinishContext();
10548  return NULL;
10549  __pyx_L4_argument_unpacking_done:;
10550  __pyx_r = __pyx_pf_3ADR_10LevelModel___init__(__pyx_self, __pyx_v_self, __pyx_v_uDict, __pyx_v_phiDict, __pyx_v_testSpaceDict, __pyx_v_matType, __pyx_v_dofBoundaryConditionsDict, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_coefficients, __pyx_v_elementQuadrature, __pyx_v_elementBoundaryQuadrature, __pyx_v_fluxBoundaryConditionsDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_v_stressTraceBoundaryConditionsSetterDict, __pyx_v_stabilization, __pyx_v_shockCapturing, __pyx_v_conservativeFluxDict, __pyx_v_numericalFluxType, __pyx_v_TimeIntegrationClass, __pyx_v_massLumping, __pyx_v_reactionLumping, __pyx_v_options, __pyx_v_name, __pyx_v_reuse_trial_and_test_quadrature, __pyx_v_sd, __pyx_v_movingDomain);
10551 
10552  /* "ADR.pyx":571
10553  * """
10554  * nCalls=0
10555  * def __init__(self, # <<<<<<<<<<<<<<
10556  * uDict,
10557  * phiDict,
10558  */
10559 
10560  /* function exit code */
10561  __Pyx_RefNannyFinishContext();
10562  return __pyx_r;
10563 }
10564 
10565 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain) {
10566  PyObject *__pyx_v_Comm = NULL;
10567  PyObject *__pyx_v_ci = NULL;
10568  PyObject *__pyx_v_flag = NULL;
10569  PyObject *__pyx_v_diffusionDict = NULL;
10570  PyObject *__pyx_v_elementQuadratureDict = NULL;
10571  int __pyx_v_elemQuadIsDict;
10572  PyObject *__pyx_v_I = NULL;
10573  PyObject *__pyx_v_elementBoundaryQuadratureDict = NULL;
10574  PyObject *__pyx_v_cj = NULL;
10575  PyObject *__pyx_v_ebNE = NULL;
10576  PyObject *__pyx_v_ebN = NULL;
10577  PyObject *__pyx_v_eN_global = NULL;
10578  PyObject *__pyx_v_ebN_element = NULL;
10579  PyObject *__pyx_v_i = NULL;
10580  PyObject *__pyx_v_nI = NULL;
10581  PyObject *__pyx_v_n = NULL;
10582  PyObject *__pyx_v_comm = NULL;
10583  PyObject *__pyx_v_k = NULL;
10584  PyObject *__pyx_v_PostProcessingTools = NULL;
10585  PyObject *__pyx_v_Archiver = NULL;
10586  PyObject *__pyx_v_fbcObject = NULL;
10587  PyObject *__pyx_v_t = NULL;
10588  PyObject *__pyx_v_g = NULL;
10589  PyObject *__pyx_v_ck = NULL;
10590  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsDict = NULL;
10591  long __pyx_v_compKernelFlag;
10592  PyObject *__pyx_v_u_j = NULL;
10593  PyObject *__pyx_v_phi_k = NULL;
10594  PyObject *__pyx_v_femSpace = NULL;
10595  PyObject *__pyx_v_dc = NULL;
10596  PyObject *__pyx_r = NULL;
10597  __Pyx_RefNannyDeclarations
10598  PyObject *__pyx_t_1 = NULL;
10599  PyObject *__pyx_t_2 = NULL;
10600  int __pyx_t_3;
10601  Py_ssize_t __pyx_t_4;
10602  PyObject *(*__pyx_t_5)(PyObject *);
10603  PyObject *__pyx_t_6 = NULL;
10604  PyObject *__pyx_t_7 = NULL;
10605  PyObject *__pyx_t_8 = NULL;
10606  Py_ssize_t __pyx_t_9;
10607  PyObject *(*__pyx_t_10)(PyObject *);
10608  Py_ssize_t __pyx_t_11;
10609  PyObject *(*__pyx_t_12)(PyObject *);
10610  int __pyx_t_13;
10611  PyObject *__pyx_t_14 = NULL;
10612  int __pyx_t_15;
10613  PyObject *(*__pyx_t_16)(PyObject *);
10614  int __pyx_t_17;
10615  Py_ssize_t __pyx_t_18;
10616  int __pyx_t_19;
10617  PyObject *__pyx_t_20 = NULL;
10618  PyObject *__pyx_t_21 = NULL;
10619  Py_ssize_t __pyx_t_22;
10620  Py_ssize_t __pyx_t_23;
10621  int __pyx_t_24;
10622  PyObject *__pyx_t_25 = NULL;
10623  __Pyx_RefNannySetupContext("__init__", 0);
10624 
10625  /* "ADR.pyx":597
10626  * sd = True,
10627  * movingDomain=False):#,
10628  * from proteus import Comm # <<<<<<<<<<<<<<
10629  * #
10630  * #set the objects describing the method and boundary conditions
10631  */
10632  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
10633  __Pyx_GOTREF(__pyx_t_1);
10634  __Pyx_INCREF(__pyx_n_s_Comm);
10635  __Pyx_GIVEREF(__pyx_n_s_Comm);
10636  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Comm);
10637  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
10638  __Pyx_GOTREF(__pyx_t_2);
10639  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10640  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
10641  __Pyx_GOTREF(__pyx_t_1);
10642  __Pyx_INCREF(__pyx_t_1);
10643  __pyx_v_Comm = __pyx_t_1;
10644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10645  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10646 
10647  /* "ADR.pyx":601
10648  * #set the objects describing the method and boundary conditions
10649  * #
10650  * self.movingDomain=movingDomain # <<<<<<<<<<<<<<
10651  * self.tLast_mesh=None
10652  * #
10653  */
10654  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, __pyx_v_movingDomain) < 0) __PYX_ERR(0, 601, __pyx_L1_error)
10655 
10656  /* "ADR.pyx":602
10657  * #
10658  * self.movingDomain=movingDomain
10659  * self.tLast_mesh=None # <<<<<<<<<<<<<<
10660  * #
10661  * self.name=name
10662  */
10663  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tLast_mesh, Py_None) < 0) __PYX_ERR(0, 602, __pyx_L1_error)
10664 
10665  /* "ADR.pyx":604
10666  * self.tLast_mesh=None
10667  * #
10668  * self.name=name # <<<<<<<<<<<<<<
10669  * self.sd=sd
10670  * self.Hess=False
10671  */
10672  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
10673 
10674  /* "ADR.pyx":605
10675  * #
10676  * self.name=name
10677  * self.sd=sd # <<<<<<<<<<<<<<
10678  * self.Hess=False
10679  * self.lowmem=True
10680  */
10681  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sd, __pyx_v_sd) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
10682 
10683  /* "ADR.pyx":606
10684  * self.name=name
10685  * self.sd=sd
10686  * self.Hess=False # <<<<<<<<<<<<<<
10687  * self.lowmem=True
10688  * self.timeTerm=True#allow turning off the time derivative
10689  */
10690  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Hess, Py_False) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
10691 
10692  /* "ADR.pyx":607
10693  * self.sd=sd
10694  * self.Hess=False
10695  * self.lowmem=True # <<<<<<<<<<<<<<
10696  * self.timeTerm=True#allow turning off the time derivative
10697  * #self.lowmem=False
10698  */
10699  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lowmem, Py_True) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
10700 
10701  /* "ADR.pyx":608
10702  * self.Hess=False
10703  * self.lowmem=True
10704  * self.timeTerm=True#allow turning off the time derivative # <<<<<<<<<<<<<<
10705  * #self.lowmem=False
10706  * self.testIsTrial=True
10707  */
10708  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeTerm, Py_True) < 0) __PYX_ERR(0, 608, __pyx_L1_error)
10709 
10710  /* "ADR.pyx":610
10711  * self.timeTerm=True#allow turning off the time derivative
10712  * #self.lowmem=False
10713  * self.testIsTrial=True # <<<<<<<<<<<<<<
10714  * self.phiTrialIsTrial=True
10715  * self.u = uDict
10716  */
10717  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testIsTrial, Py_True) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
10718 
10719  /* "ADR.pyx":611
10720  * #self.lowmem=False
10721  * self.testIsTrial=True
10722  * self.phiTrialIsTrial=True # <<<<<<<<<<<<<<
10723  * self.u = uDict
10724  * self.ua = {}#analytical solutions
10725  */
10726  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phiTrialIsTrial, Py_True) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
10727 
10728  /* "ADR.pyx":612
10729  * self.testIsTrial=True
10730  * self.phiTrialIsTrial=True
10731  * self.u = uDict # <<<<<<<<<<<<<<
10732  * self.ua = {}#analytical solutions
10733  * self.phi = phiDict
10734  */
10735  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_u, __pyx_v_uDict) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
10736 
10737  /* "ADR.pyx":613
10738  * self.phiTrialIsTrial=True
10739  * self.u = uDict
10740  * self.ua = {}#analytical solutions # <<<<<<<<<<<<<<
10741  * self.phi = phiDict
10742  * self.dphi={}
10743  */
10744  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
10745  __Pyx_GOTREF(__pyx_t_2);
10746  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ua, __pyx_t_2) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
10747  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10748 
10749  /* "ADR.pyx":614
10750  * self.u = uDict
10751  * self.ua = {}#analytical solutions
10752  * self.phi = phiDict # <<<<<<<<<<<<<<
10753  * self.dphi={}
10754  * self.matType = matType
10755  */
10756  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi, __pyx_v_phiDict) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
10757 
10758  /* "ADR.pyx":615
10759  * self.ua = {}#analytical solutions
10760  * self.phi = phiDict
10761  * self.dphi={} # <<<<<<<<<<<<<<
10762  * self.matType = matType
10763  * #mwf try to reuse test and trial information across components if spaces are the same
10764  */
10765  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
10766  __Pyx_GOTREF(__pyx_t_2);
10767  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dphi, __pyx_t_2) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
10768  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10769 
10770  /* "ADR.pyx":616
10771  * self.phi = phiDict
10772  * self.dphi={}
10773  * self.matType = matType # <<<<<<<<<<<<<<
10774  * #mwf try to reuse test and trial information across components if spaces are the same
10775  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10776  */
10777  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_matType, __pyx_v_matType) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
10778 
10779  /* "ADR.pyx":618
10780  * self.matType = matType
10781  * #mwf try to reuse test and trial information across components if spaces are the same
10782  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False # <<<<<<<<<<<<<<
10783  * if self.reuse_test_trial_quadrature:
10784  * for ci in range(1,coefficients.nc):
10785  */
10786  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature, __pyx_v_reuse_trial_and_test_quadrature) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
10787 
10788  /* "ADR.pyx":619
10789  * #mwf try to reuse test and trial information across components if spaces are the same
10790  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10791  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
10792  * for ci in range(1,coefficients.nc):
10793  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10794  */
10795  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
10796  __Pyx_GOTREF(__pyx_t_2);
10797  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
10798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10799  if (__pyx_t_3) {
10800 
10801  /* "ADR.pyx":620
10802  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10803  * if self.reuse_test_trial_quadrature:
10804  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
10805  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10806  * ## Simplicial Mesh
10807  */
10808  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10809  __Pyx_GOTREF(__pyx_t_2);
10810  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
10811  __Pyx_GOTREF(__pyx_t_1);
10812  __Pyx_INCREF(__pyx_int_1);
10813  __Pyx_GIVEREF(__pyx_int_1);
10814  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
10815  __Pyx_GIVEREF(__pyx_t_2);
10816  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
10817  __pyx_t_2 = 0;
10818  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10819  __Pyx_GOTREF(__pyx_t_2);
10820  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10821  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
10822  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
10823  __pyx_t_5 = NULL;
10824  } else {
10825  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
10826  __Pyx_GOTREF(__pyx_t_1);
10827  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 620, __pyx_L1_error)
10828  }
10829  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10830  for (;;) {
10831  if (likely(!__pyx_t_5)) {
10832  if (likely(PyList_CheckExact(__pyx_t_1))) {
10833  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
10834  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10835  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 620, __pyx_L1_error)
10836  #else
10837  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10838  __Pyx_GOTREF(__pyx_t_2);
10839  #endif
10840  } else {
10841  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
10842  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10843  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 620, __pyx_L1_error)
10844  #else
10845  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
10846  __Pyx_GOTREF(__pyx_t_2);
10847  #endif
10848  }
10849  } else {
10850  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
10851  if (unlikely(!__pyx_t_2)) {
10852  PyObject* exc_type = PyErr_Occurred();
10853  if (exc_type) {
10854  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10855  else __PYX_ERR(0, 620, __pyx_L1_error)
10856  }
10857  break;
10858  }
10859  __Pyx_GOTREF(__pyx_t_2);
10860  }
10861  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
10862  __pyx_t_2 = 0;
10863 
10864  /* "ADR.pyx":621
10865  * if self.reuse_test_trial_quadrature:
10866  * for ci in range(1,coefficients.nc):
10867  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!" # <<<<<<<<<<<<<<
10868  * ## Simplicial Mesh
10869  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10870  */
10871  #ifndef CYTHON_WITHOUT_ASSERTIONS
10872  if (unlikely(!Py_OptimizeFlag)) {
10873  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10874  __Pyx_GOTREF(__pyx_t_2);
10875  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10876  __Pyx_GOTREF(__pyx_t_6);
10877  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10878  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10879  __Pyx_GOTREF(__pyx_t_2);
10880  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10881  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10882  __Pyx_GOTREF(__pyx_t_6);
10883  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10884  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
10885  __Pyx_GOTREF(__pyx_t_2);
10886  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10887  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10888  __Pyx_GOTREF(__pyx_t_6);
10889  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10890  __Pyx_GOTREF(__pyx_t_7);
10891  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10892  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10893  __Pyx_GOTREF(__pyx_t_6);
10894  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10895  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10896  __Pyx_GOTREF(__pyx_t_7);
10897  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10898  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error)
10899  __Pyx_GOTREF(__pyx_t_6);
10900  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10901  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
10902  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10903  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10904  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 621, __pyx_L1_error)
10905  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10906  if (unlikely(!__pyx_t_3)) {
10907  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_to_reuse_test_trial_quad_all_fem);
10908  __PYX_ERR(0, 621, __pyx_L1_error)
10909  }
10910  }
10911  #endif
10912 
10913  /* "ADR.pyx":620
10914  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10915  * if self.reuse_test_trial_quadrature:
10916  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
10917  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10918  * ## Simplicial Mesh
10919  */
10920  }
10921  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10922 
10923  /* "ADR.pyx":619
10924  * #mwf try to reuse test and trial information across components if spaces are the same
10925  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10926  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
10927  * for ci in range(1,coefficients.nc):
10928  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10929  */
10930  }
10931 
10932  /* "ADR.pyx":623
10933  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10934  * ## Simplicial Mesh
10935  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now # <<<<<<<<<<<<<<
10936  * self.testSpace = testSpaceDict
10937  * self.dirichletConditions = dofBoundaryConditionsDict
10938  */
10939  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
10940  __Pyx_GOTREF(__pyx_t_1);
10941  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
10942  __Pyx_GOTREF(__pyx_t_7);
10943  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10944  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
10945  __Pyx_GOTREF(__pyx_t_1);
10946  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10947  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
10948  __Pyx_GOTREF(__pyx_t_7);
10949  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10950  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_t_7) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
10951  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10952 
10953  /* "ADR.pyx":624
10954  * ## Simplicial Mesh
10955  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10956  * self.testSpace = testSpaceDict # <<<<<<<<<<<<<<
10957  * self.dirichletConditions = dofBoundaryConditionsDict
10958  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10959  */
10960  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testSpace, __pyx_v_testSpaceDict) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
10961 
10962  /* "ADR.pyx":625
10963  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
10964  * self.testSpace = testSpaceDict
10965  * self.dirichletConditions = dofBoundaryConditionsDict # <<<<<<<<<<<<<<
10966  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10967  * self.coefficients = coefficients
10968  */
10969  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions, __pyx_v_dofBoundaryConditionsDict) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
10970 
10971  /* "ADR.pyx":626
10972  * self.testSpace = testSpaceDict
10973  * self.dirichletConditions = dofBoundaryConditionsDict
10974  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints # <<<<<<<<<<<<<<
10975  * self.coefficients = coefficients
10976  * self.coefficients.initializeMesh(self.mesh)
10977  */
10978  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletNodeSetList, Py_None) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
10979 
10980  /* "ADR.pyx":627
10981  * self.dirichletConditions = dofBoundaryConditionsDict
10982  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10983  * self.coefficients = coefficients # <<<<<<<<<<<<<<
10984  * self.coefficients.initializeMesh(self.mesh)
10985  * self.nc = self.coefficients.nc
10986  */
10987  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coefficients, __pyx_v_coefficients) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
10988 
10989  /* "ADR.pyx":628
10990  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
10991  * self.coefficients = coefficients
10992  * self.coefficients.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
10993  * self.nc = self.coefficients.nc
10994  * self.stabilization = stabilization
10995  */
10996  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
10997  __Pyx_GOTREF(__pyx_t_1);
10998  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_initializeMesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 628, __pyx_L1_error)
10999  __Pyx_GOTREF(__pyx_t_6);
11000  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11001  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
11002  __Pyx_GOTREF(__pyx_t_1);
11003  __pyx_t_2 = NULL;
11004  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11005  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
11006  if (likely(__pyx_t_2)) {
11007  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11008  __Pyx_INCREF(__pyx_t_2);
11009  __Pyx_INCREF(function);
11010  __Pyx_DECREF_SET(__pyx_t_6, function);
11011  }
11012  }
11013  if (!__pyx_t_2) {
11014  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11015  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11016  __Pyx_GOTREF(__pyx_t_7);
11017  } else {
11018  #if CYTHON_FAST_PYCALL
11019  if (PyFunction_Check(__pyx_t_6)) {
11020  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
11021  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11022  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11023  __Pyx_GOTREF(__pyx_t_7);
11024  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11025  } else
11026  #endif
11027  #if CYTHON_FAST_PYCCALL
11028  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
11029  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_1};
11030  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11031  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11032  __Pyx_GOTREF(__pyx_t_7);
11033  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11034  } else
11035  #endif
11036  {
11037  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
11038  __Pyx_GOTREF(__pyx_t_8);
11039  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
11040  __Pyx_GIVEREF(__pyx_t_1);
11041  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
11042  __pyx_t_1 = 0;
11043  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error)
11044  __Pyx_GOTREF(__pyx_t_7);
11045  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11046  }
11047  }
11048  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11049  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11050 
11051  /* "ADR.pyx":629
11052  * self.coefficients = coefficients
11053  * self.coefficients.initializeMesh(self.mesh)
11054  * self.nc = self.coefficients.nc # <<<<<<<<<<<<<<
11055  * self.stabilization = stabilization
11056  * self.shockCapturing = shockCapturing
11057  */
11058  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 629, __pyx_L1_error)
11059  __Pyx_GOTREF(__pyx_t_7);
11060  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 629, __pyx_L1_error)
11061  __Pyx_GOTREF(__pyx_t_6);
11062  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11063  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nc, __pyx_t_6) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
11064  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11065 
11066  /* "ADR.pyx":630
11067  * self.coefficients.initializeMesh(self.mesh)
11068  * self.nc = self.coefficients.nc
11069  * self.stabilization = stabilization # <<<<<<<<<<<<<<
11070  * self.shockCapturing = shockCapturing
11071  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11072  */
11073  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilization, __pyx_v_stabilization) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
11074 
11075  /* "ADR.pyx":631
11076  * self.nc = self.coefficients.nc
11077  * self.stabilization = stabilization
11078  * self.shockCapturing = shockCapturing # <<<<<<<<<<<<<<
11079  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11080  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11081  */
11082  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing, __pyx_v_shockCapturing) < 0) __PYX_ERR(0, 631, __pyx_L1_error)
11083 
11084  /* "ADR.pyx":632
11085  * self.stabilization = stabilization
11086  * self.shockCapturing = shockCapturing
11087  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now # <<<<<<<<<<<<<<
11088  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11089  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11090  */
11091  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux, __pyx_v_conservativeFluxDict) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
11092 
11093  /* "ADR.pyx":633
11094  * self.shockCapturing = shockCapturing
11095  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11096  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict # <<<<<<<<<<<<<<
11097  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11098  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11099  */
11100  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions, __pyx_v_fluxBoundaryConditionsDict) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
11101 
11102  /* "ADR.pyx":634
11103  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11104  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11105  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict # <<<<<<<<<<<<<<
11106  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11107  * #determine whether the stabilization term is nonlinear
11108  */
11109  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_v_advectiveFluxBoundaryConditionsSetterDict) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
11110 
11111  /* "ADR.pyx":635
11112  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11113  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11114  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict # <<<<<<<<<<<<<<
11115  * #determine whether the stabilization term is nonlinear
11116  * self.stabilizationIsNonlinear = False
11117  */
11118  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
11119 
11120  /* "ADR.pyx":637
11121  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11122  * #determine whether the stabilization term is nonlinear
11123  * self.stabilizationIsNonlinear = False # <<<<<<<<<<<<<<
11124  * #cek come back
11125  * if self.stabilization != None:
11126  */
11127  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_False) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
11128 
11129  /* "ADR.pyx":639
11130  * self.stabilizationIsNonlinear = False
11131  * #cek come back
11132  * if self.stabilization != None: # <<<<<<<<<<<<<<
11133  * for ci in range(self.nc):
11134  * if coefficients.mass.has_key(ci):
11135  */
11136  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error)
11137  __Pyx_GOTREF(__pyx_t_6);
11138  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __pyx_L1_error)
11139  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11140  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 639, __pyx_L1_error)
11141  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11142  if (__pyx_t_3) {
11143 
11144  /* "ADR.pyx":640
11145  * #cek come back
11146  * if self.stabilization != None:
11147  * for ci in range(self.nc): # <<<<<<<<<<<<<<
11148  * if coefficients.mass.has_key(ci):
11149  * for flag in coefficients.mass[ci].values():
11150  */
11151  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11152  __Pyx_GOTREF(__pyx_t_7);
11153  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11154  __Pyx_GOTREF(__pyx_t_6);
11155  __Pyx_GIVEREF(__pyx_t_7);
11156  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
11157  __pyx_t_7 = 0;
11158  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11159  __Pyx_GOTREF(__pyx_t_7);
11160  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11161  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
11162  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
11163  __pyx_t_5 = NULL;
11164  } else {
11165  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
11166  __Pyx_GOTREF(__pyx_t_6);
11167  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
11168  }
11169  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11170  for (;;) {
11171  if (likely(!__pyx_t_5)) {
11172  if (likely(PyList_CheckExact(__pyx_t_6))) {
11173  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
11174  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11175  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
11176  #else
11177  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11178  __Pyx_GOTREF(__pyx_t_7);
11179  #endif
11180  } else {
11181  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
11182  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11183  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
11184  #else
11185  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
11186  __Pyx_GOTREF(__pyx_t_7);
11187  #endif
11188  }
11189  } else {
11190  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
11191  if (unlikely(!__pyx_t_7)) {
11192  PyObject* exc_type = PyErr_Occurred();
11193  if (exc_type) {
11194  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11195  else __PYX_ERR(0, 640, __pyx_L1_error)
11196  }
11197  break;
11198  }
11199  __Pyx_GOTREF(__pyx_t_7);
11200  }
11201  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
11202  __pyx_t_7 = 0;
11203 
11204  /* "ADR.pyx":641
11205  * if self.stabilization != None:
11206  * for ci in range(self.nc):
11207  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11208  * for flag in coefficients.mass[ci].values():
11209  * if flag == 'nonlinear':
11210  */
11211  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error)
11212  __Pyx_GOTREF(__pyx_t_8);
11213  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
11214  __Pyx_GOTREF(__pyx_t_1);
11215  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11216  __pyx_t_8 = NULL;
11217  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11218  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
11219  if (likely(__pyx_t_8)) {
11220  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11221  __Pyx_INCREF(__pyx_t_8);
11222  __Pyx_INCREF(function);
11223  __Pyx_DECREF_SET(__pyx_t_1, function);
11224  }
11225  }
11226  if (!__pyx_t_8) {
11227  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
11228  __Pyx_GOTREF(__pyx_t_7);
11229  } else {
11230  #if CYTHON_FAST_PYCALL
11231  if (PyFunction_Check(__pyx_t_1)) {
11232  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
11233  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
11234  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11235  __Pyx_GOTREF(__pyx_t_7);
11236  } else
11237  #endif
11238  #if CYTHON_FAST_PYCCALL
11239  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
11240  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
11241  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
11242  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11243  __Pyx_GOTREF(__pyx_t_7);
11244  } else
11245  #endif
11246  {
11247  __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
11248  __Pyx_GOTREF(__pyx_t_2);
11249  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
11250  __Pyx_INCREF(__pyx_v_ci);
11251  __Pyx_GIVEREF(__pyx_v_ci);
11252  PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_ci);
11253  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
11254  __Pyx_GOTREF(__pyx_t_7);
11255  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11256  }
11257  }
11258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11259  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 641, __pyx_L1_error)
11260  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11261  if (__pyx_t_3) {
11262 
11263  /* "ADR.pyx":642
11264  * for ci in range(self.nc):
11265  * if coefficients.mass.has_key(ci):
11266  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11267  * if flag == 'nonlinear':
11268  * self.stabilizationIsNonlinear=True
11269  */
11270  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11271  __Pyx_GOTREF(__pyx_t_1);
11272  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
11273  __Pyx_GOTREF(__pyx_t_2);
11274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11275  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11276  __Pyx_GOTREF(__pyx_t_1);
11277  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11278  __pyx_t_2 = NULL;
11279  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11280  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
11281  if (likely(__pyx_t_2)) {
11282  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11283  __Pyx_INCREF(__pyx_t_2);
11284  __Pyx_INCREF(function);
11285  __Pyx_DECREF_SET(__pyx_t_1, function);
11286  }
11287  }
11288  if (__pyx_t_2) {
11289  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
11290  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11291  } else {
11292  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
11293  }
11294  __Pyx_GOTREF(__pyx_t_7);
11295  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11296  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
11297  __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
11298  __pyx_t_10 = NULL;
11299  } else {
11300  __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11301  __Pyx_GOTREF(__pyx_t_1);
11302  __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 642, __pyx_L1_error)
11303  }
11304  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11305  for (;;) {
11306  if (likely(!__pyx_t_10)) {
11307  if (likely(PyList_CheckExact(__pyx_t_1))) {
11308  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
11309  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11310  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 642, __pyx_L1_error)
11311  #else
11312  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
11313  __Pyx_GOTREF(__pyx_t_7);
11314  #endif
11315  } else {
11316  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11317  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11318  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 642, __pyx_L1_error)
11319  #else
11320  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
11321  __Pyx_GOTREF(__pyx_t_7);
11322  #endif
11323  }
11324  } else {
11325  __pyx_t_7 = __pyx_t_10(__pyx_t_1);
11326  if (unlikely(!__pyx_t_7)) {
11327  PyObject* exc_type = PyErr_Occurred();
11328  if (exc_type) {
11329  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11330  else __PYX_ERR(0, 642, __pyx_L1_error)
11331  }
11332  break;
11333  }
11334  __Pyx_GOTREF(__pyx_t_7);
11335  }
11336  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_7);
11337  __pyx_t_7 = 0;
11338 
11339  /* "ADR.pyx":643
11340  * if coefficients.mass.has_key(ci):
11341  * for flag in coefficients.mass[ci].values():
11342  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11343  * self.stabilizationIsNonlinear=True
11344  * if coefficients.advection.has_key(ci):
11345  */
11346  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
11347  if (__pyx_t_3) {
11348 
11349  /* "ADR.pyx":644
11350  * for flag in coefficients.mass[ci].values():
11351  * if flag == 'nonlinear':
11352  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11353  * if coefficients.advection.has_key(ci):
11354  * for flag in coefficients.advection[ci].values():
11355  */
11356  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
11357 
11358  /* "ADR.pyx":643
11359  * if coefficients.mass.has_key(ci):
11360  * for flag in coefficients.mass[ci].values():
11361  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11362  * self.stabilizationIsNonlinear=True
11363  * if coefficients.advection.has_key(ci):
11364  */
11365  }
11366 
11367  /* "ADR.pyx":642
11368  * for ci in range(self.nc):
11369  * if coefficients.mass.has_key(ci):
11370  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11371  * if flag == 'nonlinear':
11372  * self.stabilizationIsNonlinear=True
11373  */
11374  }
11375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11376 
11377  /* "ADR.pyx":641
11378  * if self.stabilization != None:
11379  * for ci in range(self.nc):
11380  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11381  * for flag in coefficients.mass[ci].values():
11382  * if flag == 'nonlinear':
11383  */
11384  }
11385 
11386  /* "ADR.pyx":645
11387  * if flag == 'nonlinear':
11388  * self.stabilizationIsNonlinear=True
11389  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11390  * for flag in coefficients.advection[ci].values():
11391  * if flag == 'nonlinear':
11392  */
11393  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error)
11394  __Pyx_GOTREF(__pyx_t_7);
11395  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
11396  __Pyx_GOTREF(__pyx_t_2);
11397  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11398  __pyx_t_7 = NULL;
11399  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11400  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
11401  if (likely(__pyx_t_7)) {
11402  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11403  __Pyx_INCREF(__pyx_t_7);
11404  __Pyx_INCREF(function);
11405  __Pyx_DECREF_SET(__pyx_t_2, function);
11406  }
11407  }
11408  if (!__pyx_t_7) {
11409  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11410  __Pyx_GOTREF(__pyx_t_1);
11411  } else {
11412  #if CYTHON_FAST_PYCALL
11413  if (PyFunction_Check(__pyx_t_2)) {
11414  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ci};
11415  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11416  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11417  __Pyx_GOTREF(__pyx_t_1);
11418  } else
11419  #endif
11420  #if CYTHON_FAST_PYCCALL
11421  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11422  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ci};
11423  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11424  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11425  __Pyx_GOTREF(__pyx_t_1);
11426  } else
11427  #endif
11428  {
11429  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 645, __pyx_L1_error)
11430  __Pyx_GOTREF(__pyx_t_8);
11431  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
11432  __Pyx_INCREF(__pyx_v_ci);
11433  __Pyx_GIVEREF(__pyx_v_ci);
11434  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ci);
11435  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
11436  __Pyx_GOTREF(__pyx_t_1);
11437  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11438  }
11439  }
11440  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11441  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 645, __pyx_L1_error)
11442  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11443  if (__pyx_t_3) {
11444 
11445  /* "ADR.pyx":646
11446  * self.stabilizationIsNonlinear=True
11447  * if coefficients.advection.has_key(ci):
11448  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11449  * if flag == 'nonlinear':
11450  * self.stabilizationIsNonlinear=True
11451  */
11452  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11453  __Pyx_GOTREF(__pyx_t_2);
11454  __pyx_t_8 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 646, __pyx_L1_error)
11455  __Pyx_GOTREF(__pyx_t_8);
11456  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11457  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11458  __Pyx_GOTREF(__pyx_t_2);
11459  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11460  __pyx_t_8 = NULL;
11461  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11462  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
11463  if (likely(__pyx_t_8)) {
11464  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11465  __Pyx_INCREF(__pyx_t_8);
11466  __Pyx_INCREF(function);
11467  __Pyx_DECREF_SET(__pyx_t_2, function);
11468  }
11469  }
11470  if (__pyx_t_8) {
11471  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11472  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11473  } else {
11474  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11475  }
11476  __Pyx_GOTREF(__pyx_t_1);
11477  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11478  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
11479  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
11480  __pyx_t_10 = NULL;
11481  } else {
11482  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
11483  __Pyx_GOTREF(__pyx_t_2);
11484  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 646, __pyx_L1_error)
11485  }
11486  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11487  for (;;) {
11488  if (likely(!__pyx_t_10)) {
11489  if (likely(PyList_CheckExact(__pyx_t_2))) {
11490  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
11491  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11492  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
11493  #else
11494  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11495  __Pyx_GOTREF(__pyx_t_1);
11496  #endif
11497  } else {
11498  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11499  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11500  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
11501  #else
11502  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11503  __Pyx_GOTREF(__pyx_t_1);
11504  #endif
11505  }
11506  } else {
11507  __pyx_t_1 = __pyx_t_10(__pyx_t_2);
11508  if (unlikely(!__pyx_t_1)) {
11509  PyObject* exc_type = PyErr_Occurred();
11510  if (exc_type) {
11511  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11512  else __PYX_ERR(0, 646, __pyx_L1_error)
11513  }
11514  break;
11515  }
11516  __Pyx_GOTREF(__pyx_t_1);
11517  }
11518  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
11519  __pyx_t_1 = 0;
11520 
11521  /* "ADR.pyx":647
11522  * if coefficients.advection.has_key(ci):
11523  * for flag in coefficients.advection[ci].values():
11524  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11525  * self.stabilizationIsNonlinear=True
11526  * if coefficients.diffusion.has_key(ci):
11527  */
11528  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
11529  if (__pyx_t_3) {
11530 
11531  /* "ADR.pyx":648
11532  * for flag in coefficients.advection[ci].values():
11533  * if flag == 'nonlinear':
11534  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11535  * if coefficients.diffusion.has_key(ci):
11536  * for diffusionDict in coefficients.diffusion[ci].values():
11537  */
11538  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
11539 
11540  /* "ADR.pyx":647
11541  * if coefficients.advection.has_key(ci):
11542  * for flag in coefficients.advection[ci].values():
11543  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11544  * self.stabilizationIsNonlinear=True
11545  * if coefficients.diffusion.has_key(ci):
11546  */
11547  }
11548 
11549  /* "ADR.pyx":646
11550  * self.stabilizationIsNonlinear=True
11551  * if coefficients.advection.has_key(ci):
11552  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11553  * if flag == 'nonlinear':
11554  * self.stabilizationIsNonlinear=True
11555  */
11556  }
11557  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11558 
11559  /* "ADR.pyx":645
11560  * if flag == 'nonlinear':
11561  * self.stabilizationIsNonlinear=True
11562  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11563  * for flag in coefficients.advection[ci].values():
11564  * if flag == 'nonlinear':
11565  */
11566  }
11567 
11568  /* "ADR.pyx":649
11569  * if flag == 'nonlinear':
11570  * self.stabilizationIsNonlinear=True
11571  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11572  * for diffusionDict in coefficients.diffusion[ci].values():
11573  * for flag in diffusionDict.values():
11574  */
11575  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
11576  __Pyx_GOTREF(__pyx_t_1);
11577  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 649, __pyx_L1_error)
11578  __Pyx_GOTREF(__pyx_t_8);
11579  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11580  __pyx_t_1 = NULL;
11581  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
11582  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
11583  if (likely(__pyx_t_1)) {
11584  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
11585  __Pyx_INCREF(__pyx_t_1);
11586  __Pyx_INCREF(function);
11587  __Pyx_DECREF_SET(__pyx_t_8, function);
11588  }
11589  }
11590  if (!__pyx_t_1) {
11591  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11592  __Pyx_GOTREF(__pyx_t_2);
11593  } else {
11594  #if CYTHON_FAST_PYCALL
11595  if (PyFunction_Check(__pyx_t_8)) {
11596  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ci};
11597  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11598  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11599  __Pyx_GOTREF(__pyx_t_2);
11600  } else
11601  #endif
11602  #if CYTHON_FAST_PYCCALL
11603  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
11604  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_ci};
11605  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11606  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11607  __Pyx_GOTREF(__pyx_t_2);
11608  } else
11609  #endif
11610  {
11611  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L1_error)
11612  __Pyx_GOTREF(__pyx_t_7);
11613  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
11614  __Pyx_INCREF(__pyx_v_ci);
11615  __Pyx_GIVEREF(__pyx_v_ci);
11616  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_ci);
11617  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
11618  __Pyx_GOTREF(__pyx_t_2);
11619  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11620  }
11621  }
11622  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11623  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
11624  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11625  if (__pyx_t_3) {
11626 
11627  /* "ADR.pyx":650
11628  * self.stabilizationIsNonlinear=True
11629  * if coefficients.diffusion.has_key(ci):
11630  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11631  * for flag in diffusionDict.values():
11632  * if flag != 'constant':
11633  */
11634  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11635  __Pyx_GOTREF(__pyx_t_8);
11636  __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error)
11637  __Pyx_GOTREF(__pyx_t_7);
11638  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11639  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11640  __Pyx_GOTREF(__pyx_t_8);
11641  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11642  __pyx_t_7 = NULL;
11643  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
11644  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
11645  if (likely(__pyx_t_7)) {
11646  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
11647  __Pyx_INCREF(__pyx_t_7);
11648  __Pyx_INCREF(function);
11649  __Pyx_DECREF_SET(__pyx_t_8, function);
11650  }
11651  }
11652  if (__pyx_t_7) {
11653  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11654  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11655  } else {
11656  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11657  }
11658  __Pyx_GOTREF(__pyx_t_2);
11659  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11660  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11661  __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
11662  __pyx_t_10 = NULL;
11663  } else {
11664  __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error)
11665  __Pyx_GOTREF(__pyx_t_8);
11666  __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 650, __pyx_L1_error)
11667  }
11668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11669  for (;;) {
11670  if (likely(!__pyx_t_10)) {
11671  if (likely(PyList_CheckExact(__pyx_t_8))) {
11672  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
11673  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11674  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error)
11675  #else
11676  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11677  __Pyx_GOTREF(__pyx_t_2);
11678  #endif
11679  } else {
11680  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
11681  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11682  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 650, __pyx_L1_error)
11683  #else
11684  __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
11685  __Pyx_GOTREF(__pyx_t_2);
11686  #endif
11687  }
11688  } else {
11689  __pyx_t_2 = __pyx_t_10(__pyx_t_8);
11690  if (unlikely(!__pyx_t_2)) {
11691  PyObject* exc_type = PyErr_Occurred();
11692  if (exc_type) {
11693  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11694  else __PYX_ERR(0, 650, __pyx_L1_error)
11695  }
11696  break;
11697  }
11698  __Pyx_GOTREF(__pyx_t_2);
11699  }
11700  __Pyx_XDECREF_SET(__pyx_v_diffusionDict, __pyx_t_2);
11701  __pyx_t_2 = 0;
11702 
11703  /* "ADR.pyx":651
11704  * if coefficients.diffusion.has_key(ci):
11705  * for diffusionDict in coefficients.diffusion[ci].values():
11706  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11707  * if flag != 'constant':
11708  * self.stabilizationIsNonlinear=True
11709  */
11710  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_diffusionDict, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error)
11711  __Pyx_GOTREF(__pyx_t_7);
11712  __pyx_t_1 = NULL;
11713  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
11714  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
11715  if (likely(__pyx_t_1)) {
11716  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
11717  __Pyx_INCREF(__pyx_t_1);
11718  __Pyx_INCREF(function);
11719  __Pyx_DECREF_SET(__pyx_t_7, function);
11720  }
11721  }
11722  if (__pyx_t_1) {
11723  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11724  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11725  } else {
11726  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11727  }
11728  __Pyx_GOTREF(__pyx_t_2);
11729  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11730  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11731  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0;
11732  __pyx_t_12 = NULL;
11733  } else {
11734  __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error)
11735  __Pyx_GOTREF(__pyx_t_7);
11736  __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 651, __pyx_L1_error)
11737  }
11738  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11739  for (;;) {
11740  if (likely(!__pyx_t_12)) {
11741  if (likely(PyList_CheckExact(__pyx_t_7))) {
11742  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break;
11743  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11744  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
11745  #else
11746  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11747  __Pyx_GOTREF(__pyx_t_2);
11748  #endif
11749  } else {
11750  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
11751  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11752  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
11753  #else
11754  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
11755  __Pyx_GOTREF(__pyx_t_2);
11756  #endif
11757  }
11758  } else {
11759  __pyx_t_2 = __pyx_t_12(__pyx_t_7);
11760  if (unlikely(!__pyx_t_2)) {
11761  PyObject* exc_type = PyErr_Occurred();
11762  if (exc_type) {
11763  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11764  else __PYX_ERR(0, 651, __pyx_L1_error)
11765  }
11766  break;
11767  }
11768  __Pyx_GOTREF(__pyx_t_2);
11769  }
11770  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
11771  __pyx_t_2 = 0;
11772 
11773  /* "ADR.pyx":652
11774  * for diffusionDict in coefficients.diffusion[ci].values():
11775  * for flag in diffusionDict.values():
11776  * if flag != 'constant': # <<<<<<<<<<<<<<
11777  * self.stabilizationIsNonlinear=True
11778  * if coefficients.potential.has_key(ci):
11779  */
11780  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_constant, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 652, __pyx_L1_error)
11781  if (__pyx_t_3) {
11782 
11783  /* "ADR.pyx":653
11784  * for flag in diffusionDict.values():
11785  * if flag != 'constant':
11786  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11787  * if coefficients.potential.has_key(ci):
11788  * for flag in coefficients.potential[ci].values():
11789  */
11790  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
11791 
11792  /* "ADR.pyx":652
11793  * for diffusionDict in coefficients.diffusion[ci].values():
11794  * for flag in diffusionDict.values():
11795  * if flag != 'constant': # <<<<<<<<<<<<<<
11796  * self.stabilizationIsNonlinear=True
11797  * if coefficients.potential.has_key(ci):
11798  */
11799  }
11800 
11801  /* "ADR.pyx":651
11802  * if coefficients.diffusion.has_key(ci):
11803  * for diffusionDict in coefficients.diffusion[ci].values():
11804  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11805  * if flag != 'constant':
11806  * self.stabilizationIsNonlinear=True
11807  */
11808  }
11809  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11810 
11811  /* "ADR.pyx":650
11812  * self.stabilizationIsNonlinear=True
11813  * if coefficients.diffusion.has_key(ci):
11814  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11815  * for flag in diffusionDict.values():
11816  * if flag != 'constant':
11817  */
11818  }
11819  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11820 
11821  /* "ADR.pyx":649
11822  * if flag == 'nonlinear':
11823  * self.stabilizationIsNonlinear=True
11824  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11825  * for diffusionDict in coefficients.diffusion[ci].values():
11826  * for flag in diffusionDict.values():
11827  */
11828  }
11829 
11830  /* "ADR.pyx":654
11831  * if flag != 'constant':
11832  * self.stabilizationIsNonlinear=True
11833  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
11834  * for flag in coefficients.potential[ci].values():
11835  * if flag == 'nonlinear':
11836  */
11837  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 654, __pyx_L1_error)
11838  __Pyx_GOTREF(__pyx_t_7);
11839  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
11840  __Pyx_GOTREF(__pyx_t_2);
11841  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11842  __pyx_t_7 = NULL;
11843  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11844  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
11845  if (likely(__pyx_t_7)) {
11846  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11847  __Pyx_INCREF(__pyx_t_7);
11848  __Pyx_INCREF(function);
11849  __Pyx_DECREF_SET(__pyx_t_2, function);
11850  }
11851  }
11852  if (!__pyx_t_7) {
11853  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11854  __Pyx_GOTREF(__pyx_t_8);
11855  } else {
11856  #if CYTHON_FAST_PYCALL
11857  if (PyFunction_Check(__pyx_t_2)) {
11858  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ci};
11859  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11860  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11861  __Pyx_GOTREF(__pyx_t_8);
11862  } else
11863  #endif
11864  #if CYTHON_FAST_PYCCALL
11865  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11866  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ci};
11867  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11868  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11869  __Pyx_GOTREF(__pyx_t_8);
11870  } else
11871  #endif
11872  {
11873  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
11874  __Pyx_GOTREF(__pyx_t_1);
11875  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
11876  __Pyx_INCREF(__pyx_v_ci);
11877  __Pyx_GIVEREF(__pyx_v_ci);
11878  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_ci);
11879  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 654, __pyx_L1_error)
11880  __Pyx_GOTREF(__pyx_t_8);
11881  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11882  }
11883  }
11884  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11885  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
11886  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11887  if (__pyx_t_3) {
11888 
11889  /* "ADR.pyx":655
11890  * self.stabilizationIsNonlinear=True
11891  * if coefficients.potential.has_key(ci):
11892  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
11893  * if flag == 'nonlinear':
11894  * self.stabilizationIsNonlinear=True
11895  */
11896  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11897  __Pyx_GOTREF(__pyx_t_2);
11898  __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
11899  __Pyx_GOTREF(__pyx_t_1);
11900  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11901  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11902  __Pyx_GOTREF(__pyx_t_2);
11903  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11904  __pyx_t_1 = NULL;
11905  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11906  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
11907  if (likely(__pyx_t_1)) {
11908  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11909  __Pyx_INCREF(__pyx_t_1);
11910  __Pyx_INCREF(function);
11911  __Pyx_DECREF_SET(__pyx_t_2, function);
11912  }
11913  }
11914  if (__pyx_t_1) {
11915  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11916  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11917  } else {
11918  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11919  }
11920  __Pyx_GOTREF(__pyx_t_8);
11921  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11922  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
11923  __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
11924  __pyx_t_10 = NULL;
11925  } else {
11926  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
11927  __Pyx_GOTREF(__pyx_t_2);
11928  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 655, __pyx_L1_error)
11929  }
11930  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11931  for (;;) {
11932  if (likely(!__pyx_t_10)) {
11933  if (likely(PyList_CheckExact(__pyx_t_2))) {
11934  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
11935  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11936  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
11937  #else
11938  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11939  __Pyx_GOTREF(__pyx_t_8);
11940  #endif
11941  } else {
11942  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11943  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11944  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
11945  #else
11946  __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 655, __pyx_L1_error)
11947  __Pyx_GOTREF(__pyx_t_8);
11948  #endif
11949  }
11950  } else {
11951  __pyx_t_8 = __pyx_t_10(__pyx_t_2);
11952  if (unlikely(!__pyx_t_8)) {
11953  PyObject* exc_type = PyErr_Occurred();
11954  if (exc_type) {
11955  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11956  else __PYX_ERR(0, 655, __pyx_L1_error)
11957  }
11958  break;
11959  }
11960  __Pyx_GOTREF(__pyx_t_8);
11961  }
11962  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_8);
11963  __pyx_t_8 = 0;
11964 
11965  /* "ADR.pyx":656
11966  * if coefficients.potential.has_key(ci):
11967  * for flag in coefficients.potential[ci].values():
11968  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11969  * self.stabilizationIsNonlinear=True
11970  * if coefficients.reaction.has_key(ci):
11971  */
11972  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
11973  if (__pyx_t_3) {
11974 
11975  /* "ADR.pyx":657
11976  * for flag in coefficients.potential[ci].values():
11977  * if flag == 'nonlinear':
11978  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11979  * if coefficients.reaction.has_key(ci):
11980  * for flag in coefficients.reaction[ci].values():
11981  */
11982  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
11983 
11984  /* "ADR.pyx":656
11985  * if coefficients.potential.has_key(ci):
11986  * for flag in coefficients.potential[ci].values():
11987  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11988  * self.stabilizationIsNonlinear=True
11989  * if coefficients.reaction.has_key(ci):
11990  */
11991  }
11992 
11993  /* "ADR.pyx":655
11994  * self.stabilizationIsNonlinear=True
11995  * if coefficients.potential.has_key(ci):
11996  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
11997  * if flag == 'nonlinear':
11998  * self.stabilizationIsNonlinear=True
11999  */
12000  }
12001  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12002 
12003  /* "ADR.pyx":654
12004  * if flag != 'constant':
12005  * self.stabilizationIsNonlinear=True
12006  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
12007  * for flag in coefficients.potential[ci].values():
12008  * if flag == 'nonlinear':
12009  */
12010  }
12011 
12012  /* "ADR.pyx":658
12013  * if flag == 'nonlinear':
12014  * self.stabilizationIsNonlinear=True
12015  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12016  * for flag in coefficients.reaction[ci].values():
12017  * if flag == 'nonlinear':
12018  */
12019  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 658, __pyx_L1_error)
12020  __Pyx_GOTREF(__pyx_t_8);
12021  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
12022  __Pyx_GOTREF(__pyx_t_1);
12023  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12024  __pyx_t_8 = NULL;
12025  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12026  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
12027  if (likely(__pyx_t_8)) {
12028  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12029  __Pyx_INCREF(__pyx_t_8);
12030  __Pyx_INCREF(function);
12031  __Pyx_DECREF_SET(__pyx_t_1, function);
12032  }
12033  }
12034  if (!__pyx_t_8) {
12035  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12036  __Pyx_GOTREF(__pyx_t_2);
12037  } else {
12038  #if CYTHON_FAST_PYCALL
12039  if (PyFunction_Check(__pyx_t_1)) {
12040  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
12041  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12042  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12043  __Pyx_GOTREF(__pyx_t_2);
12044  } else
12045  #endif
12046  #if CYTHON_FAST_PYCCALL
12047  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
12048  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ci};
12049  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12050  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12051  __Pyx_GOTREF(__pyx_t_2);
12052  } else
12053  #endif
12054  {
12055  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 658, __pyx_L1_error)
12056  __Pyx_GOTREF(__pyx_t_7);
12057  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
12058  __Pyx_INCREF(__pyx_v_ci);
12059  __Pyx_GIVEREF(__pyx_v_ci);
12060  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_ci);
12061  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
12062  __Pyx_GOTREF(__pyx_t_2);
12063  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12064  }
12065  }
12066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12067  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 658, __pyx_L1_error)
12068  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12069  if (__pyx_t_3) {
12070 
12071  /* "ADR.pyx":659
12072  * self.stabilizationIsNonlinear=True
12073  * if coefficients.reaction.has_key(ci):
12074  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12075  * if flag == 'nonlinear':
12076  * self.stabilizationIsNonlinear=True
12077  */
12078  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12079  __Pyx_GOTREF(__pyx_t_1);
12080  __pyx_t_7 = PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
12081  __Pyx_GOTREF(__pyx_t_7);
12082  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12083  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12084  __Pyx_GOTREF(__pyx_t_1);
12085  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12086  __pyx_t_7 = NULL;
12087  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12088  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
12089  if (likely(__pyx_t_7)) {
12090  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12091  __Pyx_INCREF(__pyx_t_7);
12092  __Pyx_INCREF(function);
12093  __Pyx_DECREF_SET(__pyx_t_1, function);
12094  }
12095  }
12096  if (__pyx_t_7) {
12097  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12098  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12099  } else {
12100  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12101  }
12102  __Pyx_GOTREF(__pyx_t_2);
12103  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12104  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
12105  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
12106  __pyx_t_10 = NULL;
12107  } else {
12108  __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
12109  __Pyx_GOTREF(__pyx_t_1);
12110  __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 659, __pyx_L1_error)
12111  }
12112  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12113  for (;;) {
12114  if (likely(!__pyx_t_10)) {
12115  if (likely(PyList_CheckExact(__pyx_t_1))) {
12116  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
12117  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12118  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
12119  #else
12120  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12121  __Pyx_GOTREF(__pyx_t_2);
12122  #endif
12123  } else {
12124  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12125  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12126  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 659, __pyx_L1_error)
12127  #else
12128  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
12129  __Pyx_GOTREF(__pyx_t_2);
12130  #endif
12131  }
12132  } else {
12133  __pyx_t_2 = __pyx_t_10(__pyx_t_1);
12134  if (unlikely(!__pyx_t_2)) {
12135  PyObject* exc_type = PyErr_Occurred();
12136  if (exc_type) {
12137  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12138  else __PYX_ERR(0, 659, __pyx_L1_error)
12139  }
12140  break;
12141  }
12142  __Pyx_GOTREF(__pyx_t_2);
12143  }
12144  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
12145  __pyx_t_2 = 0;
12146 
12147  /* "ADR.pyx":660
12148  * if coefficients.reaction.has_key(ci):
12149  * for flag in coefficients.reaction[ci].values():
12150  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12151  * self.stabilizationIsNonlinear=True
12152  * if coefficients.hamiltonian.has_key(ci):
12153  */
12154  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
12155  if (__pyx_t_3) {
12156 
12157  /* "ADR.pyx":661
12158  * for flag in coefficients.reaction[ci].values():
12159  * if flag == 'nonlinear':
12160  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12161  * if coefficients.hamiltonian.has_key(ci):
12162  * for flag in coefficients.hamiltonian[ci].values():
12163  */
12164  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
12165 
12166  /* "ADR.pyx":660
12167  * if coefficients.reaction.has_key(ci):
12168  * for flag in coefficients.reaction[ci].values():
12169  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12170  * self.stabilizationIsNonlinear=True
12171  * if coefficients.hamiltonian.has_key(ci):
12172  */
12173  }
12174 
12175  /* "ADR.pyx":659
12176  * self.stabilizationIsNonlinear=True
12177  * if coefficients.reaction.has_key(ci):
12178  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12179  * if flag == 'nonlinear':
12180  * self.stabilizationIsNonlinear=True
12181  */
12182  }
12183  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12184 
12185  /* "ADR.pyx":658
12186  * if flag == 'nonlinear':
12187  * self.stabilizationIsNonlinear=True
12188  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12189  * for flag in coefficients.reaction[ci].values():
12190  * if flag == 'nonlinear':
12191  */
12192  }
12193 
12194  /* "ADR.pyx":662
12195  * if flag == 'nonlinear':
12196  * self.stabilizationIsNonlinear=True
12197  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12198  * for flag in coefficients.hamiltonian[ci].values():
12199  * if flag == 'nonlinear':
12200  */
12201  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
12202  __Pyx_GOTREF(__pyx_t_2);
12203  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 662, __pyx_L1_error)
12204  __Pyx_GOTREF(__pyx_t_7);
12205  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12206  __pyx_t_2 = NULL;
12207  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12208  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
12209  if (likely(__pyx_t_2)) {
12210  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12211  __Pyx_INCREF(__pyx_t_2);
12212  __Pyx_INCREF(function);
12213  __Pyx_DECREF_SET(__pyx_t_7, function);
12214  }
12215  }
12216  if (!__pyx_t_2) {
12217  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12218  __Pyx_GOTREF(__pyx_t_1);
12219  } else {
12220  #if CYTHON_FAST_PYCALL
12221  if (PyFunction_Check(__pyx_t_7)) {
12222  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_ci};
12223  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12224  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12225  __Pyx_GOTREF(__pyx_t_1);
12226  } else
12227  #endif
12228  #if CYTHON_FAST_PYCCALL
12229  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
12230  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_ci};
12231  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12232  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12233  __Pyx_GOTREF(__pyx_t_1);
12234  } else
12235  #endif
12236  {
12237  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 662, __pyx_L1_error)
12238  __Pyx_GOTREF(__pyx_t_8);
12239  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
12240  __Pyx_INCREF(__pyx_v_ci);
12241  __Pyx_GIVEREF(__pyx_v_ci);
12242  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ci);
12243  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
12244  __Pyx_GOTREF(__pyx_t_1);
12245  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12246  }
12247  }
12248  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12249  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 662, __pyx_L1_error)
12250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12251  if (__pyx_t_3) {
12252 
12253  /* "ADR.pyx":663
12254  * self.stabilizationIsNonlinear=True
12255  * if coefficients.hamiltonian.has_key(ci):
12256  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12257  * if flag == 'nonlinear':
12258  * self.stabilizationIsNonlinear=True
12259  */
12260  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
12261  __Pyx_GOTREF(__pyx_t_7);
12262  __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 663, __pyx_L1_error)
12263  __Pyx_GOTREF(__pyx_t_8);
12264  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12265  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
12266  __Pyx_GOTREF(__pyx_t_7);
12267  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12268  __pyx_t_8 = NULL;
12269  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12270  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
12271  if (likely(__pyx_t_8)) {
12272  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12273  __Pyx_INCREF(__pyx_t_8);
12274  __Pyx_INCREF(function);
12275  __Pyx_DECREF_SET(__pyx_t_7, function);
12276  }
12277  }
12278  if (__pyx_t_8) {
12279  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12280  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12281  } else {
12282  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12283  }
12284  __Pyx_GOTREF(__pyx_t_1);
12285  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12286  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12287  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
12288  __pyx_t_10 = NULL;
12289  } else {
12290  __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
12291  __Pyx_GOTREF(__pyx_t_7);
12292  __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 663, __pyx_L1_error)
12293  }
12294  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12295  for (;;) {
12296  if (likely(!__pyx_t_10)) {
12297  if (likely(PyList_CheckExact(__pyx_t_7))) {
12298  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
12299  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12300  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 663, __pyx_L1_error)
12301  #else
12302  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12303  __Pyx_GOTREF(__pyx_t_1);
12304  #endif
12305  } else {
12306  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
12307  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12308  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 663, __pyx_L1_error)
12309  #else
12310  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
12311  __Pyx_GOTREF(__pyx_t_1);
12312  #endif
12313  }
12314  } else {
12315  __pyx_t_1 = __pyx_t_10(__pyx_t_7);
12316  if (unlikely(!__pyx_t_1)) {
12317  PyObject* exc_type = PyErr_Occurred();
12318  if (exc_type) {
12319  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12320  else __PYX_ERR(0, 663, __pyx_L1_error)
12321  }
12322  break;
12323  }
12324  __Pyx_GOTREF(__pyx_t_1);
12325  }
12326  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
12327  __pyx_t_1 = 0;
12328 
12329  /* "ADR.pyx":664
12330  * if coefficients.hamiltonian.has_key(ci):
12331  * for flag in coefficients.hamiltonian[ci].values():
12332  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12333  * self.stabilizationIsNonlinear=True
12334  * #determine if we need element boundary storage
12335  */
12336  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
12337  if (__pyx_t_3) {
12338 
12339  /* "ADR.pyx":665
12340  * for flag in coefficients.hamiltonian[ci].values():
12341  * if flag == 'nonlinear':
12342  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12343  * #determine if we need element boundary storage
12344  * self.elementBoundaryIntegrals = {}
12345  */
12346  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
12347 
12348  /* "ADR.pyx":664
12349  * if coefficients.hamiltonian.has_key(ci):
12350  * for flag in coefficients.hamiltonian[ci].values():
12351  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12352  * self.stabilizationIsNonlinear=True
12353  * #determine if we need element boundary storage
12354  */
12355  }
12356 
12357  /* "ADR.pyx":663
12358  * self.stabilizationIsNonlinear=True
12359  * if coefficients.hamiltonian.has_key(ci):
12360  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12361  * if flag == 'nonlinear':
12362  * self.stabilizationIsNonlinear=True
12363  */
12364  }
12365  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12366 
12367  /* "ADR.pyx":662
12368  * if flag == 'nonlinear':
12369  * self.stabilizationIsNonlinear=True
12370  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12371  * for flag in coefficients.hamiltonian[ci].values():
12372  * if flag == 'nonlinear':
12373  */
12374  }
12375 
12376  /* "ADR.pyx":640
12377  * #cek come back
12378  * if self.stabilization != None:
12379  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12380  * if coefficients.mass.has_key(ci):
12381  * for flag in coefficients.mass[ci].values():
12382  */
12383  }
12384  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12385 
12386  /* "ADR.pyx":639
12387  * self.stabilizationIsNonlinear = False
12388  * #cek come back
12389  * if self.stabilization != None: # <<<<<<<<<<<<<<
12390  * for ci in range(self.nc):
12391  * if coefficients.mass.has_key(ci):
12392  */
12393  }
12394 
12395  /* "ADR.pyx":667
12396  * self.stabilizationIsNonlinear=True
12397  * #determine if we need element boundary storage
12398  * self.elementBoundaryIntegrals = {} # <<<<<<<<<<<<<<
12399  * for ci in range(self.nc):
12400  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or
12401  */
12402  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
12403  __Pyx_GOTREF(__pyx_t_6);
12404  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals, __pyx_t_6) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
12405  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12406 
12407  /* "ADR.pyx":668
12408  * #determine if we need element boundary storage
12409  * self.elementBoundaryIntegrals = {}
12410  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12411  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or
12412  * (numericalFluxType != None) or
12413  */
12414  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12415  __Pyx_GOTREF(__pyx_t_6);
12416  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12417  __Pyx_GOTREF(__pyx_t_7);
12418  __Pyx_GIVEREF(__pyx_t_6);
12419  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
12420  __pyx_t_6 = 0;
12421  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12422  __Pyx_GOTREF(__pyx_t_6);
12423  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12424  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12425  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
12426  __pyx_t_5 = NULL;
12427  } else {
12428  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
12429  __Pyx_GOTREF(__pyx_t_7);
12430  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
12431  }
12432  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12433  for (;;) {
12434  if (likely(!__pyx_t_5)) {
12435  if (likely(PyList_CheckExact(__pyx_t_7))) {
12436  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
12437  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12438  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
12439  #else
12440  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12441  __Pyx_GOTREF(__pyx_t_6);
12442  #endif
12443  } else {
12444  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
12445  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12446  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
12447  #else
12448  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
12449  __Pyx_GOTREF(__pyx_t_6);
12450  #endif
12451  }
12452  } else {
12453  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
12454  if (unlikely(!__pyx_t_6)) {
12455  PyObject* exc_type = PyErr_Occurred();
12456  if (exc_type) {
12457  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12458  else __PYX_ERR(0, 668, __pyx_L1_error)
12459  }
12460  break;
12461  }
12462  __Pyx_GOTREF(__pyx_t_6);
12463  }
12464  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
12465  __pyx_t_6 = 0;
12466 
12467  /* "ADR.pyx":669
12468  * self.elementBoundaryIntegrals = {}
12469  * for ci in range(self.nc):
12470  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or # <<<<<<<<<<<<<<
12471  * (numericalFluxType != None) or
12472  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12473  */
12474  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
12475  __Pyx_GOTREF(__pyx_t_1);
12476  __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 669, __pyx_L1_error)
12477  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12478  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
12479  if (!__pyx_t_3) {
12480  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12481  } else {
12482  __Pyx_INCREF(__pyx_t_8);
12483  __pyx_t_6 = __pyx_t_8;
12484  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12485  goto __pyx_L37_bool_binop_done;
12486  }
12487 
12488  /* "ADR.pyx":670
12489  * for ci in range(self.nc):
12490  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or
12491  * (numericalFluxType != None) or # <<<<<<<<<<<<<<
12492  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12493  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12494  */
12495  __pyx_t_8 = PyObject_RichCompare(__pyx_v_numericalFluxType, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 670, __pyx_L1_error)
12496  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 670, __pyx_L1_error)
12497  if (!__pyx_t_3) {
12498  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12499  } else {
12500  __Pyx_INCREF(__pyx_t_8);
12501  __pyx_t_6 = __pyx_t_8;
12502  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12503  goto __pyx_L37_bool_binop_done;
12504  }
12505 
12506  /* "ADR.pyx":671
12507  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or
12508  * (numericalFluxType != None) or
12509  * (self.fluxBoundaryConditions[ci] == 'outFlow') or # <<<<<<<<<<<<<<
12510  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12511  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12512  */
12513  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error)
12514  __Pyx_GOTREF(__pyx_t_8);
12515  __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
12516  __Pyx_GOTREF(__pyx_t_1);
12517  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12518  __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_outFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 671, __pyx_L1_error)
12519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12520  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 671, __pyx_L1_error)
12521  if (!__pyx_t_3) {
12522  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12523  } else {
12524  __Pyx_INCREF(__pyx_t_8);
12525  __pyx_t_6 = __pyx_t_8;
12526  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12527  goto __pyx_L37_bool_binop_done;
12528  }
12529 
12530  /* "ADR.pyx":672
12531  * (numericalFluxType != None) or
12532  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12533  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or # <<<<<<<<<<<<<<
12534  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12535  * #
12536  */
12537  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 672, __pyx_L1_error)
12538  __Pyx_GOTREF(__pyx_t_8);
12539  __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
12540  __Pyx_GOTREF(__pyx_t_1);
12541  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12542  __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_mixedFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 672, __pyx_L1_error)
12543  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12544  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
12545  if (!__pyx_t_3) {
12546  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12547  } else {
12548  __Pyx_INCREF(__pyx_t_8);
12549  __pyx_t_6 = __pyx_t_8;
12550  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12551  goto __pyx_L37_bool_binop_done;
12552  }
12553 
12554  /* "ADR.pyx":673
12555  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12556  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12557  * (self.fluxBoundaryConditions[ci] == 'setFlow')) # <<<<<<<<<<<<<<
12558  * #
12559  * #calculate some dimensions
12560  */
12561  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
12562  __Pyx_GOTREF(__pyx_t_8);
12563  __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
12564  __Pyx_GOTREF(__pyx_t_1);
12565  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12566  __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_setFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 673, __pyx_L1_error)
12567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12568  __Pyx_INCREF(__pyx_t_8);
12569  __pyx_t_6 = __pyx_t_8;
12570  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12571  __pyx_L37_bool_binop_done:;
12572 
12573  /* "ADR.pyx":669
12574  * self.elementBoundaryIntegrals = {}
12575  * for ci in range(self.nc):
12576  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or # <<<<<<<<<<<<<<
12577  * (numericalFluxType != None) or
12578  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12579  */
12580  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 669, __pyx_L1_error)
12581  __Pyx_GOTREF(__pyx_t_8);
12582  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_ci, __pyx_t_6) < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
12583  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12584  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12585 
12586  /* "ADR.pyx":668
12587  * #determine if we need element boundary storage
12588  * self.elementBoundaryIntegrals = {}
12589  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12590  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux != None) or
12591  * (numericalFluxType != None) or
12592  */
12593  }
12594  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12595 
12596  /* "ADR.pyx":677
12597  * #calculate some dimensions
12598  * #
12599  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables # <<<<<<<<<<<<<<
12600  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12601  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12602  */
12603  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
12604  __Pyx_GOTREF(__pyx_t_7);
12605  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
12606  __Pyx_GOTREF(__pyx_t_6);
12607  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12608  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error)
12609  __Pyx_GOTREF(__pyx_t_7);
12610  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12611  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 677, __pyx_L1_error)
12612  __Pyx_GOTREF(__pyx_t_6);
12613  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12614  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global, __pyx_t_6) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
12615  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12616 
12617  /* "ADR.pyx":678
12618  * #
12619  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12620  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()] # <<<<<<<<<<<<<<
12621  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12622  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12623  */
12624  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
12625  __Pyx_GOTREF(__pyx_t_6);
12626  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
12627  __Pyx_GOTREF(__pyx_t_8);
12628  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
12629  __Pyx_GOTREF(__pyx_t_1);
12630  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12631  __pyx_t_8 = NULL;
12632  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12633  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
12634  if (likely(__pyx_t_8)) {
12635  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12636  __Pyx_INCREF(__pyx_t_8);
12637  __Pyx_INCREF(function);
12638  __Pyx_DECREF_SET(__pyx_t_1, function);
12639  }
12640  }
12641  if (__pyx_t_8) {
12642  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12643  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12644  } else {
12645  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12646  }
12647  __Pyx_GOTREF(__pyx_t_7);
12648  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12649  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
12650  __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
12651  __pyx_t_5 = NULL;
12652  } else {
12653  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
12654  __Pyx_GOTREF(__pyx_t_1);
12655  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
12656  }
12657  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12658  for (;;) {
12659  if (likely(!__pyx_t_5)) {
12660  if (likely(PyList_CheckExact(__pyx_t_1))) {
12661  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
12662  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12663  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
12664  #else
12665  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12666  __Pyx_GOTREF(__pyx_t_7);
12667  #endif
12668  } else {
12669  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12670  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12671  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
12672  #else
12673  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12674  __Pyx_GOTREF(__pyx_t_7);
12675  #endif
12676  }
12677  } else {
12678  __pyx_t_7 = __pyx_t_5(__pyx_t_1);
12679  if (unlikely(!__pyx_t_7)) {
12680  PyObject* exc_type = PyErr_Occurred();
12681  if (exc_type) {
12682  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12683  else __PYX_ERR(0, 678, __pyx_L1_error)
12684  }
12685  break;
12686  }
12687  __Pyx_GOTREF(__pyx_t_7);
12688  }
12689  __Pyx_XDECREF_SET(__pyx_v_u_j, __pyx_t_7);
12690  __pyx_t_7 = 0;
12691  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_u_j, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
12692  __Pyx_GOTREF(__pyx_t_7);
12693  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
12694  __Pyx_GOTREF(__pyx_t_8);
12695  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12696  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 678, __pyx_L1_error)
12697  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12698  }
12699  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12700  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element, __pyx_t_6) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
12701  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12702 
12703  /* "ADR.pyx":679
12704  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12705  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12706  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12707  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12708  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12709  */
12710  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
12711  __Pyx_GOTREF(__pyx_t_6);
12712  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12713  __Pyx_GOTREF(__pyx_t_8);
12714  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12715  __Pyx_GOTREF(__pyx_t_7);
12716  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12717  __pyx_t_8 = NULL;
12718  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12719  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
12720  if (likely(__pyx_t_8)) {
12721  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12722  __Pyx_INCREF(__pyx_t_8);
12723  __Pyx_INCREF(function);
12724  __Pyx_DECREF_SET(__pyx_t_7, function);
12725  }
12726  }
12727  if (__pyx_t_8) {
12728  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12729  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12730  } else {
12731  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12732  }
12733  __Pyx_GOTREF(__pyx_t_1);
12734  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12735  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12736  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
12737  __pyx_t_5 = NULL;
12738  } else {
12739  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 679, __pyx_L1_error)
12740  __Pyx_GOTREF(__pyx_t_7);
12741  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error)
12742  }
12743  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12744  for (;;) {
12745  if (likely(!__pyx_t_5)) {
12746  if (likely(PyList_CheckExact(__pyx_t_7))) {
12747  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
12748  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12749  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12750  #else
12751  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12752  __Pyx_GOTREF(__pyx_t_1);
12753  #endif
12754  } else {
12755  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
12756  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12757  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
12758  #else
12759  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12760  __Pyx_GOTREF(__pyx_t_1);
12761  #endif
12762  }
12763  } else {
12764  __pyx_t_1 = __pyx_t_5(__pyx_t_7);
12765  if (unlikely(!__pyx_t_1)) {
12766  PyObject* exc_type = PyErr_Occurred();
12767  if (exc_type) {
12768  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12769  else __PYX_ERR(0, 679, __pyx_L1_error)
12770  }
12771  break;
12772  }
12773  __Pyx_GOTREF(__pyx_t_1);
12774  }
12775  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_1);
12776  __pyx_t_1 = 0;
12777  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
12778  __Pyx_GOTREF(__pyx_t_1);
12779  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 679, __pyx_L1_error)
12780  __Pyx_GOTREF(__pyx_t_8);
12781  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12782  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 679, __pyx_L1_error)
12783  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12784  }
12785  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12786  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_phi_trial_element, __pyx_t_6) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
12787  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12788 
12789  /* "ADR.pyx":680
12790  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12791  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12792  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12793  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12794  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12795  */
12796  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
12797  __Pyx_GOTREF(__pyx_t_6);
12798  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
12799  __Pyx_GOTREF(__pyx_t_8);
12800  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
12801  __Pyx_GOTREF(__pyx_t_1);
12802  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12803  __pyx_t_8 = NULL;
12804  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12805  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
12806  if (likely(__pyx_t_8)) {
12807  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12808  __Pyx_INCREF(__pyx_t_8);
12809  __Pyx_INCREF(function);
12810  __Pyx_DECREF_SET(__pyx_t_1, function);
12811  }
12812  }
12813  if (__pyx_t_8) {
12814  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12815  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12816  } else {
12817  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12818  }
12819  __Pyx_GOTREF(__pyx_t_7);
12820  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12821  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
12822  __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
12823  __pyx_t_5 = NULL;
12824  } else {
12825  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
12826  __Pyx_GOTREF(__pyx_t_1);
12827  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error)
12828  }
12829  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12830  for (;;) {
12831  if (likely(!__pyx_t_5)) {
12832  if (likely(PyList_CheckExact(__pyx_t_1))) {
12833  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
12834  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12835  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
12836  #else
12837  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12838  __Pyx_GOTREF(__pyx_t_7);
12839  #endif
12840  } else {
12841  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12842  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12843  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
12844  #else
12845  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12846  __Pyx_GOTREF(__pyx_t_7);
12847  #endif
12848  }
12849  } else {
12850  __pyx_t_7 = __pyx_t_5(__pyx_t_1);
12851  if (unlikely(!__pyx_t_7)) {
12852  PyObject* exc_type = PyErr_Occurred();
12853  if (exc_type) {
12854  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12855  else __PYX_ERR(0, 680, __pyx_L1_error)
12856  }
12857  break;
12858  }
12859  __Pyx_GOTREF(__pyx_t_7);
12860  }
12861  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_7);
12862  __pyx_t_7 = 0;
12863  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12864  __Pyx_GOTREF(__pyx_t_7);
12865  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
12866  __Pyx_GOTREF(__pyx_t_8);
12867  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12868  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_interpolationConditions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
12869  __Pyx_GOTREF(__pyx_t_7);
12870  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12871  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 680, __pyx_L1_error)
12872  __Pyx_GOTREF(__pyx_t_8);
12873  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12874  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 680, __pyx_L1_error)
12875  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12876  }
12877  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12878  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_n_phi_ip_element, __pyx_t_6) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
12879  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12880 
12881  /* "ADR.pyx":681
12882  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12883  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12884  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()] # <<<<<<<<<<<<<<
12885  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12886  * self.nVDOF_element = sum(self.nDOF_trial_element)
12887  */
12888  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error)
12889  __Pyx_GOTREF(__pyx_t_6);
12890  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
12891  __Pyx_GOTREF(__pyx_t_8);
12892  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
12893  __Pyx_GOTREF(__pyx_t_7);
12894  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12895  __pyx_t_8 = NULL;
12896  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12897  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
12898  if (likely(__pyx_t_8)) {
12899  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12900  __Pyx_INCREF(__pyx_t_8);
12901  __Pyx_INCREF(function);
12902  __Pyx_DECREF_SET(__pyx_t_7, function);
12903  }
12904  }
12905  if (__pyx_t_8) {
12906  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12907  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12908  } else {
12909  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12910  }
12911  __Pyx_GOTREF(__pyx_t_1);
12912  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12913  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12914  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
12915  __pyx_t_5 = NULL;
12916  } else {
12917  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
12918  __Pyx_GOTREF(__pyx_t_7);
12919  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error)
12920  }
12921  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12922  for (;;) {
12923  if (likely(!__pyx_t_5)) {
12924  if (likely(PyList_CheckExact(__pyx_t_7))) {
12925  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
12926  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12927  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
12928  #else
12929  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12930  __Pyx_GOTREF(__pyx_t_1);
12931  #endif
12932  } else {
12933  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
12934  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12935  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 681, __pyx_L1_error)
12936  #else
12937  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12938  __Pyx_GOTREF(__pyx_t_1);
12939  #endif
12940  }
12941  } else {
12942  __pyx_t_1 = __pyx_t_5(__pyx_t_7);
12943  if (unlikely(!__pyx_t_1)) {
12944  PyObject* exc_type = PyErr_Occurred();
12945  if (exc_type) {
12946  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12947  else __PYX_ERR(0, 681, __pyx_L1_error)
12948  }
12949  break;
12950  }
12951  __Pyx_GOTREF(__pyx_t_1);
12952  }
12953  __Pyx_XDECREF_SET(__pyx_v_femSpace, __pyx_t_1);
12954  __pyx_t_1 = 0;
12955  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
12956  __Pyx_GOTREF(__pyx_t_1);
12957  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 681, __pyx_L1_error)
12958  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12959  }
12960  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12961  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_test_element, __pyx_t_6) < 0) __PYX_ERR(0, 681, __pyx_L1_error)
12962  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12963 
12964  /* "ADR.pyx":682
12965  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12966  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12967  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()] # <<<<<<<<<<<<<<
12968  * self.nVDOF_element = sum(self.nDOF_trial_element)
12969  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
12970  */
12971  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)
12972  __Pyx_GOTREF(__pyx_t_6);
12973  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
12974  __Pyx_GOTREF(__pyx_t_1);
12975  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
12976  __Pyx_GOTREF(__pyx_t_8);
12977  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12978  __pyx_t_1 = NULL;
12979  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
12980  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
12981  if (likely(__pyx_t_1)) {
12982  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12983  __Pyx_INCREF(__pyx_t_1);
12984  __Pyx_INCREF(function);
12985  __Pyx_DECREF_SET(__pyx_t_8, function);
12986  }
12987  }
12988  if (__pyx_t_1) {
12989  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
12990  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12991  } else {
12992  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
12993  }
12994  __Pyx_GOTREF(__pyx_t_7);
12995  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12996  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
12997  __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
12998  __pyx_t_5 = NULL;
12999  } else {
13000  __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
13001  __Pyx_GOTREF(__pyx_t_8);
13002  __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
13003  }
13004  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13005  for (;;) {
13006  if (likely(!__pyx_t_5)) {
13007  if (likely(PyList_CheckExact(__pyx_t_8))) {
13008  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
13009  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13010  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
13011  #else
13012  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
13013  __Pyx_GOTREF(__pyx_t_7);
13014  #endif
13015  } else {
13016  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
13017  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13018  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error)
13019  #else
13020  __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
13021  __Pyx_GOTREF(__pyx_t_7);
13022  #endif
13023  }
13024  } else {
13025  __pyx_t_7 = __pyx_t_5(__pyx_t_8);
13026  if (unlikely(!__pyx_t_7)) {
13027  PyObject* exc_type = PyErr_Occurred();
13028  if (exc_type) {
13029  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13030  else __PYX_ERR(0, 682, __pyx_L1_error)
13031  }
13032  break;
13033  }
13034  __Pyx_GOTREF(__pyx_t_7);
13035  }
13036  __Pyx_XDECREF_SET(__pyx_v_dc, __pyx_t_7);
13037  __pyx_t_7 = 0;
13038  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dc, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error)
13039  __Pyx_GOTREF(__pyx_t_7);
13040  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 682, __pyx_L1_error)
13041  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13042  }
13043  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13044  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global, __pyx_t_6) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
13045  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13046 
13047  /* "ADR.pyx":683
13048  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
13049  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
13050  * self.nVDOF_element = sum(self.nDOF_trial_element) # <<<<<<<<<<<<<<
13051  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
13052  * #
13053  */
13054  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L1_error)
13055  __Pyx_GOTREF(__pyx_t_6);
13056  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error)
13057  __Pyx_GOTREF(__pyx_t_8);
13058  __Pyx_GIVEREF(__pyx_t_6);
13059  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
13060  __pyx_t_6 = 0;
13061  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L1_error)
13062  __Pyx_GOTREF(__pyx_t_6);
13063  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13064  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nVDOF_element, __pyx_t_6) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
13065  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13066 
13067  /* "ADR.pyx":684
13068  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
13069  * self.nVDOF_element = sum(self.nDOF_trial_element)
13070  * self.nFreeVDOF_global = sum(self.nFreeDOF_global) # <<<<<<<<<<<<<<
13071  * #
13072  * NonlinearEquation.__init__(self,self.nFreeVDOF_global)
13073  */
13074  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error)
13075  __Pyx_GOTREF(__pyx_t_6);
13076  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error)
13077  __Pyx_GOTREF(__pyx_t_8);
13078  __Pyx_GIVEREF(__pyx_t_6);
13079  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
13080  __pyx_t_6 = 0;
13081  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error)
13082  __Pyx_GOTREF(__pyx_t_6);
13083  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13084  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global, __pyx_t_6) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
13085  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13086 
13087  /* "ADR.pyx":686
13088  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
13089  * #
13090  * NonlinearEquation.__init__(self,self.nFreeVDOF_global) # <<<<<<<<<<<<<<
13091  * #
13092  * #build the quadrature point dictionaries from the input (this
13093  */
13094  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
13095  __Pyx_GOTREF(__pyx_t_8);
13096  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_init); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
13097  __Pyx_GOTREF(__pyx_t_7);
13098  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13099  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
13100  __Pyx_GOTREF(__pyx_t_8);
13101  __pyx_t_1 = NULL;
13102  __pyx_t_13 = 0;
13103  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
13104  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
13105  if (likely(__pyx_t_1)) {
13106  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
13107  __Pyx_INCREF(__pyx_t_1);
13108  __Pyx_INCREF(function);
13109  __Pyx_DECREF_SET(__pyx_t_7, function);
13110  __pyx_t_13 = 1;
13111  }
13112  }
13113  #if CYTHON_FAST_PYCALL
13114  if (PyFunction_Check(__pyx_t_7)) {
13115  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_self, __pyx_t_8};
13116  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
13117  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13118  __Pyx_GOTREF(__pyx_t_6);
13119  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13120  } else
13121  #endif
13122  #if CYTHON_FAST_PYCCALL
13123  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
13124  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_self, __pyx_t_8};
13125  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
13126  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13127  __Pyx_GOTREF(__pyx_t_6);
13128  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13129  } else
13130  #endif
13131  {
13132  __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
13133  __Pyx_GOTREF(__pyx_t_2);
13134  if (__pyx_t_1) {
13135  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
13136  }
13137  __Pyx_INCREF(__pyx_v_self);
13138  __Pyx_GIVEREF(__pyx_v_self);
13139  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_v_self);
13140  __Pyx_GIVEREF(__pyx_t_8);
13141  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_t_8);
13142  __pyx_t_8 = 0;
13143  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
13144  __Pyx_GOTREF(__pyx_t_6);
13145  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13146  }
13147  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13148  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13149 
13150  /* "ADR.pyx":692
13151  * #complete)
13152  * #
13153  * elementQuadratureDict={} # <<<<<<<<<<<<<<
13154  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13155  * if elemQuadIsDict: #set terms manually
13156  */
13157  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 692, __pyx_L1_error)
13158  __Pyx_GOTREF(__pyx_t_6);
13159  __pyx_v_elementQuadratureDict = ((PyObject*)__pyx_t_6);
13160  __pyx_t_6 = 0;
13161 
13162  /* "ADR.pyx":693
13163  * #
13164  * elementQuadratureDict={}
13165  * elemQuadIsDict = isinstance(elementQuadrature,dict) # <<<<<<<<<<<<<<
13166  * if elemQuadIsDict: #set terms manually
13167  * for I in self.coefficients.elementIntegralKeys:
13168  */
13169  __pyx_t_3 = PyDict_Check(__pyx_v_elementQuadrature);
13170  __pyx_v_elemQuadIsDict = __pyx_t_3;
13171 
13172  /* "ADR.pyx":694
13173  * elementQuadratureDict={}
13174  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13175  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13176  * for I in self.coefficients.elementIntegralKeys:
13177  * if elementQuadrature.has_key(I):
13178  */
13179  __pyx_t_3 = (__pyx_v_elemQuadIsDict != 0);
13180  if (__pyx_t_3) {
13181 
13182  /* "ADR.pyx":695
13183  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13184  * if elemQuadIsDict: #set terms manually
13185  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13186  * if elementQuadrature.has_key(I):
13187  * elementQuadratureDict[I] = elementQuadrature[I]
13188  */
13189  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
13190  __Pyx_GOTREF(__pyx_t_6);
13191  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
13192  __Pyx_GOTREF(__pyx_t_7);
13193  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13194  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13195  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13196  __pyx_t_5 = NULL;
13197  } else {
13198  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
13199  __Pyx_GOTREF(__pyx_t_6);
13200  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
13201  }
13202  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13203  for (;;) {
13204  if (likely(!__pyx_t_5)) {
13205  if (likely(PyList_CheckExact(__pyx_t_6))) {
13206  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13207  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13208  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
13209  #else
13210  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
13211  __Pyx_GOTREF(__pyx_t_7);
13212  #endif
13213  } else {
13214  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13215  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13216  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 695, __pyx_L1_error)
13217  #else
13218  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
13219  __Pyx_GOTREF(__pyx_t_7);
13220  #endif
13221  }
13222  } else {
13223  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
13224  if (unlikely(!__pyx_t_7)) {
13225  PyObject* exc_type = PyErr_Occurred();
13226  if (exc_type) {
13227  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13228  else __PYX_ERR(0, 695, __pyx_L1_error)
13229  }
13230  break;
13231  }
13232  __Pyx_GOTREF(__pyx_t_7);
13233  }
13234  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_7);
13235  __pyx_t_7 = 0;
13236 
13237  /* "ADR.pyx":696
13238  * if elemQuadIsDict: #set terms manually
13239  * for I in self.coefficients.elementIntegralKeys:
13240  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13241  * elementQuadratureDict[I] = elementQuadrature[I]
13242  * else:
13243  */
13244  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
13245  __Pyx_GOTREF(__pyx_t_2);
13246  __pyx_t_8 = NULL;
13247  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13248  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
13249  if (likely(__pyx_t_8)) {
13250  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13251  __Pyx_INCREF(__pyx_t_8);
13252  __Pyx_INCREF(function);
13253  __Pyx_DECREF_SET(__pyx_t_2, function);
13254  }
13255  }
13256  if (!__pyx_t_8) {
13257  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_I); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
13258  __Pyx_GOTREF(__pyx_t_7);
13259  } else {
13260  #if CYTHON_FAST_PYCALL
13261  if (PyFunction_Check(__pyx_t_2)) {
13262  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_I};
13263  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
13264  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13265  __Pyx_GOTREF(__pyx_t_7);
13266  } else
13267  #endif
13268  #if CYTHON_FAST_PYCCALL
13269  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13270  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_I};
13271  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
13272  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13273  __Pyx_GOTREF(__pyx_t_7);
13274  } else
13275  #endif
13276  {
13277  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
13278  __Pyx_GOTREF(__pyx_t_1);
13279  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
13280  __Pyx_INCREF(__pyx_v_I);
13281  __Pyx_GIVEREF(__pyx_v_I);
13282  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_I);
13283  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
13284  __Pyx_GOTREF(__pyx_t_7);
13285  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13286  }
13287  }
13288  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13289  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
13290  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13291  if (__pyx_t_3) {
13292 
13293  /* "ADR.pyx":697
13294  * for I in self.coefficients.elementIntegralKeys:
13295  * if elementQuadrature.has_key(I):
13296  * elementQuadratureDict[I] = elementQuadrature[I] # <<<<<<<<<<<<<<
13297  * else:
13298  * elementQuadratureDict[I] = elementQuadrature['default']
13299  */
13300  __pyx_t_7 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error)
13301  __Pyx_GOTREF(__pyx_t_7);
13302  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_7) < 0)) __PYX_ERR(0, 697, __pyx_L1_error)
13303  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13304 
13305  /* "ADR.pyx":696
13306  * if elemQuadIsDict: #set terms manually
13307  * for I in self.coefficients.elementIntegralKeys:
13308  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13309  * elementQuadratureDict[I] = elementQuadrature[I]
13310  * else:
13311  */
13312  goto __pyx_L55;
13313  }
13314 
13315  /* "ADR.pyx":699
13316  * elementQuadratureDict[I] = elementQuadrature[I]
13317  * else:
13318  * elementQuadratureDict[I] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13319  * else:
13320  * for I in self.coefficients.elementIntegralKeys:
13321  */
13322  /*else*/ {
13323  __pyx_t_7 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 699, __pyx_L1_error)
13324  __Pyx_GOTREF(__pyx_t_7);
13325  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_7) < 0)) __PYX_ERR(0, 699, __pyx_L1_error)
13326  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13327  }
13328  __pyx_L55:;
13329 
13330  /* "ADR.pyx":695
13331  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13332  * if elemQuadIsDict: #set terms manually
13333  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13334  * if elementQuadrature.has_key(I):
13335  * elementQuadratureDict[I] = elementQuadrature[I]
13336  */
13337  }
13338  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13339 
13340  /* "ADR.pyx":694
13341  * elementQuadratureDict={}
13342  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13343  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13344  * for I in self.coefficients.elementIntegralKeys:
13345  * if elementQuadrature.has_key(I):
13346  */
13347  goto __pyx_L52;
13348  }
13349 
13350  /* "ADR.pyx":701
13351  * elementQuadratureDict[I] = elementQuadrature['default']
13352  * else:
13353  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13354  * elementQuadratureDict[I] = elementQuadrature
13355  * if self.stabilization != None:
13356  */
13357  /*else*/ {
13358  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
13359  __Pyx_GOTREF(__pyx_t_6);
13360  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
13361  __Pyx_GOTREF(__pyx_t_7);
13362  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13363  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13364  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13365  __pyx_t_5 = NULL;
13366  } else {
13367  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
13368  __Pyx_GOTREF(__pyx_t_6);
13369  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
13370  }
13371  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13372  for (;;) {
13373  if (likely(!__pyx_t_5)) {
13374  if (likely(PyList_CheckExact(__pyx_t_6))) {
13375  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13376  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13377  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
13378  #else
13379  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
13380  __Pyx_GOTREF(__pyx_t_7);
13381  #endif
13382  } else {
13383  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13384  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13385  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
13386  #else
13387  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
13388  __Pyx_GOTREF(__pyx_t_7);
13389  #endif
13390  }
13391  } else {
13392  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
13393  if (unlikely(!__pyx_t_7)) {
13394  PyObject* exc_type = PyErr_Occurred();
13395  if (exc_type) {
13396  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13397  else __PYX_ERR(0, 701, __pyx_L1_error)
13398  }
13399  break;
13400  }
13401  __Pyx_GOTREF(__pyx_t_7);
13402  }
13403  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_7);
13404  __pyx_t_7 = 0;
13405 
13406  /* "ADR.pyx":702
13407  * else:
13408  * for I in self.coefficients.elementIntegralKeys:
13409  * elementQuadratureDict[I] = elementQuadrature # <<<<<<<<<<<<<<
13410  * if self.stabilization != None:
13411  * for I in self.coefficients.elementIntegralKeys:
13412  */
13413  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 702, __pyx_L1_error)
13414 
13415  /* "ADR.pyx":701
13416  * elementQuadratureDict[I] = elementQuadrature['default']
13417  * else:
13418  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13419  * elementQuadratureDict[I] = elementQuadrature
13420  * if self.stabilization != None:
13421  */
13422  }
13423  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13424  }
13425  __pyx_L52:;
13426 
13427  /* "ADR.pyx":703
13428  * for I in self.coefficients.elementIntegralKeys:
13429  * elementQuadratureDict[I] = elementQuadrature
13430  * if self.stabilization != None: # <<<<<<<<<<<<<<
13431  * for I in self.coefficients.elementIntegralKeys:
13432  * if elemQuadIsDict:
13433  */
13434  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
13435  __Pyx_GOTREF(__pyx_t_6);
13436  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L1_error)
13437  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13438  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 703, __pyx_L1_error)
13439  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13440  if (__pyx_t_3) {
13441 
13442  /* "ADR.pyx":704
13443  * elementQuadratureDict[I] = elementQuadrature
13444  * if self.stabilization != None:
13445  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13446  * if elemQuadIsDict:
13447  * if elementQuadrature.has_key(I):
13448  */
13449  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
13450  __Pyx_GOTREF(__pyx_t_7);
13451  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13452  __Pyx_GOTREF(__pyx_t_6);
13453  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13454  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13455  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13456  __pyx_t_5 = NULL;
13457  } else {
13458  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 704, __pyx_L1_error)
13459  __Pyx_GOTREF(__pyx_t_7);
13460  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error)
13461  }
13462  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13463  for (;;) {
13464  if (likely(!__pyx_t_5)) {
13465  if (likely(PyList_CheckExact(__pyx_t_7))) {
13466  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13467  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13468  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
13469  #else
13470  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13471  __Pyx_GOTREF(__pyx_t_6);
13472  #endif
13473  } else {
13474  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13475  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13476  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 704, __pyx_L1_error)
13477  #else
13478  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
13479  __Pyx_GOTREF(__pyx_t_6);
13480  #endif
13481  }
13482  } else {
13483  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13484  if (unlikely(!__pyx_t_6)) {
13485  PyObject* exc_type = PyErr_Occurred();
13486  if (exc_type) {
13487  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13488  else __PYX_ERR(0, 704, __pyx_L1_error)
13489  }
13490  break;
13491  }
13492  __Pyx_GOTREF(__pyx_t_6);
13493  }
13494  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13495  __pyx_t_6 = 0;
13496 
13497  /* "ADR.pyx":705
13498  * if self.stabilization != None:
13499  * for I in self.coefficients.elementIntegralKeys:
13500  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13501  * if elementQuadrature.has_key(I):
13502  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13503  */
13504  __pyx_t_3 = (__pyx_v_elemQuadIsDict != 0);
13505  if (__pyx_t_3) {
13506 
13507  /* "ADR.pyx":706
13508  * for I in self.coefficients.elementIntegralKeys:
13509  * if elemQuadIsDict:
13510  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13511  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13512  * else:
13513  */
13514  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
13515  __Pyx_GOTREF(__pyx_t_2);
13516  __pyx_t_1 = NULL;
13517  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13518  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
13519  if (likely(__pyx_t_1)) {
13520  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13521  __Pyx_INCREF(__pyx_t_1);
13522  __Pyx_INCREF(function);
13523  __Pyx_DECREF_SET(__pyx_t_2, function);
13524  }
13525  }
13526  if (!__pyx_t_1) {
13527  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13528  __Pyx_GOTREF(__pyx_t_6);
13529  } else {
13530  #if CYTHON_FAST_PYCALL
13531  if (PyFunction_Check(__pyx_t_2)) {
13532  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_I};
13533  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13534  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13535  __Pyx_GOTREF(__pyx_t_6);
13536  } else
13537  #endif
13538  #if CYTHON_FAST_PYCCALL
13539  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13540  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_I};
13541  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13542  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13543  __Pyx_GOTREF(__pyx_t_6);
13544  } else
13545  #endif
13546  {
13547  __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error)
13548  __Pyx_GOTREF(__pyx_t_8);
13549  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
13550  __Pyx_INCREF(__pyx_v_I);
13551  __Pyx_GIVEREF(__pyx_v_I);
13552  PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_I);
13553  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
13554  __Pyx_GOTREF(__pyx_t_6);
13555  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13556  }
13557  }
13558  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13559  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 706, __pyx_L1_error)
13560  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13561  if (__pyx_t_3) {
13562 
13563  /* "ADR.pyx":707
13564  * if elemQuadIsDict:
13565  * if elementQuadrature.has_key(I):
13566  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
13567  * else:
13568  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13569  */
13570  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error)
13571  __Pyx_GOTREF(__pyx_t_6);
13572  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__18, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
13573  __Pyx_GOTREF(__pyx_t_2);
13574  __pyx_t_8 = PyNumber_Add(__pyx_tuple__17, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error)
13575  __Pyx_GOTREF(__pyx_t_8);
13576  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13577  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_8, __pyx_t_6) < 0)) __PYX_ERR(0, 707, __pyx_L1_error)
13578  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13579  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13580 
13581  /* "ADR.pyx":706
13582  * for I in self.coefficients.elementIntegralKeys:
13583  * if elemQuadIsDict:
13584  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13585  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13586  * else:
13587  */
13588  goto __pyx_L62;
13589  }
13590 
13591  /* "ADR.pyx":709
13592  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13593  * else:
13594  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13595  * else:
13596  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13597  */
13598  /*else*/ {
13599  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error)
13600  __Pyx_GOTREF(__pyx_t_6);
13601  __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 709, __pyx_L1_error)
13602  __Pyx_GOTREF(__pyx_t_8);
13603  __pyx_t_2 = PyNumber_Add(__pyx_tuple__19, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
13604  __Pyx_GOTREF(__pyx_t_2);
13605  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13606  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
13607  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13608  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13609  }
13610  __pyx_L62:;
13611 
13612  /* "ADR.pyx":705
13613  * if self.stabilization != None:
13614  * for I in self.coefficients.elementIntegralKeys:
13615  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13616  * if elementQuadrature.has_key(I):
13617  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13618  */
13619  goto __pyx_L61;
13620  }
13621 
13622  /* "ADR.pyx":711
13623  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13624  * else:
13625  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature # <<<<<<<<<<<<<<
13626  * if self.shockCapturing != None:
13627  * for ci in self.shockCapturing.components:
13628  */
13629  /*else*/ {
13630  __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__22, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
13631  __Pyx_GOTREF(__pyx_t_6);
13632  __pyx_t_2 = PyNumber_Add(__pyx_tuple__21, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
13633  __Pyx_GOTREF(__pyx_t_2);
13634  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13635  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 711, __pyx_L1_error)
13636  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13637  }
13638  __pyx_L61:;
13639 
13640  /* "ADR.pyx":704
13641  * elementQuadratureDict[I] = elementQuadrature
13642  * if self.stabilization != None:
13643  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13644  * if elemQuadIsDict:
13645  * if elementQuadrature.has_key(I):
13646  */
13647  }
13648  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13649 
13650  /* "ADR.pyx":703
13651  * for I in self.coefficients.elementIntegralKeys:
13652  * elementQuadratureDict[I] = elementQuadrature
13653  * if self.stabilization != None: # <<<<<<<<<<<<<<
13654  * for I in self.coefficients.elementIntegralKeys:
13655  * if elemQuadIsDict:
13656  */
13657  }
13658 
13659  /* "ADR.pyx":712
13660  * else:
13661  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13662  * if self.shockCapturing != None: # <<<<<<<<<<<<<<
13663  * for ci in self.shockCapturing.components:
13664  * if elemQuadIsDict:
13665  */
13666  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
13667  __Pyx_GOTREF(__pyx_t_7);
13668  __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
13669  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13670  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 712, __pyx_L1_error)
13671  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13672  if (__pyx_t_3) {
13673 
13674  /* "ADR.pyx":713
13675  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13676  * if self.shockCapturing != None:
13677  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13678  * if elemQuadIsDict:
13679  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13680  */
13681  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
13682  __Pyx_GOTREF(__pyx_t_2);
13683  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_components); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error)
13684  __Pyx_GOTREF(__pyx_t_7);
13685  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13686  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13687  __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
13688  __pyx_t_5 = NULL;
13689  } else {
13690  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
13691  __Pyx_GOTREF(__pyx_t_2);
13692  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
13693  }
13694  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13695  for (;;) {
13696  if (likely(!__pyx_t_5)) {
13697  if (likely(PyList_CheckExact(__pyx_t_2))) {
13698  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
13699  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13700  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
13701  #else
13702  __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error)
13703  __Pyx_GOTREF(__pyx_t_7);
13704  #endif
13705  } else {
13706  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
13707  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13708  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
13709  #else
13710  __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error)
13711  __Pyx_GOTREF(__pyx_t_7);
13712  #endif
13713  }
13714  } else {
13715  __pyx_t_7 = __pyx_t_5(__pyx_t_2);
13716  if (unlikely(!__pyx_t_7)) {
13717  PyObject* exc_type = PyErr_Occurred();
13718  if (exc_type) {
13719  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13720  else __PYX_ERR(0, 713, __pyx_L1_error)
13721  }
13722  break;
13723  }
13724  __Pyx_GOTREF(__pyx_t_7);
13725  }
13726  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
13727  __pyx_t_7 = 0;
13728 
13729  /* "ADR.pyx":714
13730  * if self.shockCapturing != None:
13731  * for ci in self.shockCapturing.components:
13732  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13733  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13734  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13735  */
13736  __pyx_t_3 = (__pyx_v_elemQuadIsDict != 0);
13737  if (__pyx_t_3) {
13738 
13739  /* "ADR.pyx":715
13740  * for ci in self.shockCapturing.components:
13741  * if elemQuadIsDict:
13742  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13743  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13744  * else:
13745  */
13746  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 715, __pyx_L1_error)
13747  __Pyx_GOTREF(__pyx_t_6);
13748  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error)
13749  __Pyx_GOTREF(__pyx_t_8);
13750  __Pyx_INCREF(__pyx_n_s_numDiff);
13751  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13752  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_numDiff);
13753  __Pyx_INCREF(__pyx_v_ci);
13754  __Pyx_GIVEREF(__pyx_v_ci);
13755  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
13756  __Pyx_INCREF(__pyx_v_ci);
13757  __Pyx_GIVEREF(__pyx_v_ci);
13758  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
13759  __pyx_t_1 = NULL;
13760  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13761  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
13762  if (likely(__pyx_t_1)) {
13763  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13764  __Pyx_INCREF(__pyx_t_1);
13765  __Pyx_INCREF(function);
13766  __Pyx_DECREF_SET(__pyx_t_6, function);
13767  }
13768  }
13769  if (!__pyx_t_1) {
13770  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
13771  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13772  __Pyx_GOTREF(__pyx_t_7);
13773  } else {
13774  #if CYTHON_FAST_PYCALL
13775  if (PyFunction_Check(__pyx_t_6)) {
13776  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
13777  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
13778  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13779  __Pyx_GOTREF(__pyx_t_7);
13780  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13781  } else
13782  #endif
13783  #if CYTHON_FAST_PYCCALL
13784  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13785  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_8};
13786  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
13787  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13788  __Pyx_GOTREF(__pyx_t_7);
13789  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13790  } else
13791  #endif
13792  {
13793  __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 715, __pyx_L1_error)
13794  __Pyx_GOTREF(__pyx_t_14);
13795  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL;
13796  __Pyx_GIVEREF(__pyx_t_8);
13797  PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_8);
13798  __pyx_t_8 = 0;
13799  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
13800  __Pyx_GOTREF(__pyx_t_7);
13801  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13802  }
13803  }
13804  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13805  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
13806  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13807  if (__pyx_t_3) {
13808 
13809  /* "ADR.pyx":716
13810  * if elemQuadIsDict:
13811  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13812  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)] # <<<<<<<<<<<<<<
13813  * else:
13814  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13815  */
13816  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 716, __pyx_L1_error)
13817  __Pyx_GOTREF(__pyx_t_7);
13818  __Pyx_INCREF(__pyx_n_s_numDiff);
13819  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13820  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_numDiff);
13821  __Pyx_INCREF(__pyx_v_ci);
13822  __Pyx_GIVEREF(__pyx_v_ci);
13823  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
13824  __Pyx_INCREF(__pyx_v_ci);
13825  __Pyx_GIVEREF(__pyx_v_ci);
13826  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
13827  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 716, __pyx_L1_error)
13828  __Pyx_GOTREF(__pyx_t_6);
13829  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13830  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 716, __pyx_L1_error)
13831  __Pyx_GOTREF(__pyx_t_7);
13832  __Pyx_INCREF(__pyx_n_s_numDiff);
13833  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13834  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_numDiff);
13835  __Pyx_INCREF(__pyx_v_ci);
13836  __Pyx_GIVEREF(__pyx_v_ci);
13837  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
13838  __Pyx_INCREF(__pyx_v_ci);
13839  __Pyx_GIVEREF(__pyx_v_ci);
13840  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
13841  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_7, __pyx_t_6) < 0)) __PYX_ERR(0, 716, __pyx_L1_error)
13842  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13843  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13844 
13845  /* "ADR.pyx":715
13846  * for ci in self.shockCapturing.components:
13847  * if elemQuadIsDict:
13848  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13849  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13850  * else:
13851  */
13852  goto __pyx_L67;
13853  }
13854 
13855  /* "ADR.pyx":718
13856  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13857  * else:
13858  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13859  * else:
13860  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13861  */
13862  /*else*/ {
13863  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 718, __pyx_L1_error)
13864  __Pyx_GOTREF(__pyx_t_6);
13865  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
13866  __Pyx_GOTREF(__pyx_t_7);
13867  __Pyx_INCREF(__pyx_n_s_numDiff);
13868  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13869  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_numDiff);
13870  __Pyx_INCREF(__pyx_v_ci);
13871  __Pyx_GIVEREF(__pyx_v_ci);
13872  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
13873  __Pyx_INCREF(__pyx_v_ci);
13874  __Pyx_GIVEREF(__pyx_v_ci);
13875  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
13876  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_7, __pyx_t_6) < 0)) __PYX_ERR(0, 718, __pyx_L1_error)
13877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13878  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13879  }
13880  __pyx_L67:;
13881 
13882  /* "ADR.pyx":714
13883  * if self.shockCapturing != None:
13884  * for ci in self.shockCapturing.components:
13885  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13886  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13887  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13888  */
13889  goto __pyx_L66;
13890  }
13891 
13892  /* "ADR.pyx":720
13893  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13894  * else:
13895  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature # <<<<<<<<<<<<<<
13896  * if massLumping:
13897  * for ci in self.coefficients.mass.keys():
13898  */
13899  /*else*/ {
13900  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 720, __pyx_L1_error)
13901  __Pyx_GOTREF(__pyx_t_6);
13902  __Pyx_INCREF(__pyx_n_s_numDiff);
13903  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13904  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_numDiff);
13905  __Pyx_INCREF(__pyx_v_ci);
13906  __Pyx_GIVEREF(__pyx_v_ci);
13907  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
13908  __Pyx_INCREF(__pyx_v_ci);
13909  __Pyx_GIVEREF(__pyx_v_ci);
13910  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
13911  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_6, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(0, 720, __pyx_L1_error)
13912  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13913  }
13914  __pyx_L66:;
13915 
13916  /* "ADR.pyx":713
13917  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13918  * if self.shockCapturing != None:
13919  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13920  * if elemQuadIsDict:
13921  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13922  */
13923  }
13924  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13925 
13926  /* "ADR.pyx":712
13927  * else:
13928  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13929  * if self.shockCapturing != None: # <<<<<<<<<<<<<<
13930  * for ci in self.shockCapturing.components:
13931  * if elemQuadIsDict:
13932  */
13933  }
13934 
13935  /* "ADR.pyx":721
13936  * else:
13937  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13938  * if massLumping: # <<<<<<<<<<<<<<
13939  * for ci in self.coefficients.mass.keys():
13940  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13941  */
13942  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_massLumping); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 721, __pyx_L1_error)
13943  if (__pyx_t_3) {
13944 
13945  /* "ADR.pyx":722
13946  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13947  * if massLumping:
13948  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
13949  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13950  * for I in self.coefficients.elementIntegralKeys:
13951  */
13952  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13953  __Pyx_GOTREF(__pyx_t_6);
13954  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_mass); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
13955  __Pyx_GOTREF(__pyx_t_7);
13956  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13957  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13958  __Pyx_GOTREF(__pyx_t_6);
13959  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13960  __pyx_t_7 = NULL;
13961  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13962  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
13963  if (likely(__pyx_t_7)) {
13964  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13965  __Pyx_INCREF(__pyx_t_7);
13966  __Pyx_INCREF(function);
13967  __Pyx_DECREF_SET(__pyx_t_6, function);
13968  }
13969  }
13970  if (__pyx_t_7) {
13971  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
13972  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13973  } else {
13974  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
13975  }
13976  __Pyx_GOTREF(__pyx_t_2);
13977  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13978  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
13979  __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13980  __pyx_t_5 = NULL;
13981  } else {
13982  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
13983  __Pyx_GOTREF(__pyx_t_6);
13984  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error)
13985  }
13986  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13987  for (;;) {
13988  if (likely(!__pyx_t_5)) {
13989  if (likely(PyList_CheckExact(__pyx_t_6))) {
13990  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13991  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13992  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
13993  #else
13994  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
13995  __Pyx_GOTREF(__pyx_t_2);
13996  #endif
13997  } else {
13998  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13999  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14000  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
14001  #else
14002  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
14003  __Pyx_GOTREF(__pyx_t_2);
14004  #endif
14005  }
14006  } else {
14007  __pyx_t_2 = __pyx_t_5(__pyx_t_6);
14008  if (unlikely(!__pyx_t_2)) {
14009  PyObject* exc_type = PyErr_Occurred();
14010  if (exc_type) {
14011  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14012  else __PYX_ERR(0, 722, __pyx_L1_error)
14013  }
14014  break;
14015  }
14016  __Pyx_GOTREF(__pyx_t_2);
14017  }
14018  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
14019  __pyx_t_2 = 0;
14020 
14021  /* "ADR.pyx":723
14022  * if massLumping:
14023  * for ci in self.coefficients.mass.keys():
14024  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14025  * for I in self.coefficients.elementIntegralKeys:
14026  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14027  */
14028  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
14029  __Pyx_GOTREF(__pyx_t_7);
14030  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 723, __pyx_L1_error)
14031  __Pyx_GOTREF(__pyx_t_14);
14032  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14033  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
14034  __Pyx_GOTREF(__pyx_t_7);
14035  __pyx_t_8 = NULL;
14036  __pyx_t_13 = 0;
14037  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
14038  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_14);
14039  if (likely(__pyx_t_8)) {
14040  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
14041  __Pyx_INCREF(__pyx_t_8);
14042  __Pyx_INCREF(function);
14043  __Pyx_DECREF_SET(__pyx_t_14, function);
14044  __pyx_t_13 = 1;
14045  }
14046  }
14047  #if CYTHON_FAST_PYCALL
14048  if (PyFunction_Check(__pyx_t_14)) {
14049  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_int_1};
14050  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
14051  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14052  __Pyx_GOTREF(__pyx_t_2);
14053  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14054  } else
14055  #endif
14056  #if CYTHON_FAST_PYCCALL
14057  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
14058  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_int_1};
14059  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
14060  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14061  __Pyx_GOTREF(__pyx_t_2);
14062  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14063  } else
14064  #endif
14065  {
14066  __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
14067  __Pyx_GOTREF(__pyx_t_1);
14068  if (__pyx_t_8) {
14069  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
14070  }
14071  __Pyx_GIVEREF(__pyx_t_7);
14072  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_7);
14073  __Pyx_INCREF(__pyx_int_1);
14074  __Pyx_GIVEREF(__pyx_int_1);
14075  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_int_1);
14076  __pyx_t_7 = 0;
14077  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
14078  __Pyx_GOTREF(__pyx_t_2);
14079  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14080  }
14081  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14082  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 723, __pyx_L1_error)
14083  __Pyx_GOTREF(__pyx_t_14);
14084  __Pyx_INCREF(__pyx_n_s_m);
14085  __Pyx_GIVEREF(__pyx_n_s_m);
14086  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_m);
14087  __Pyx_INCREF(__pyx_v_ci);
14088  __Pyx_GIVEREF(__pyx_v_ci);
14089  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ci);
14090  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 723, __pyx_L1_error)
14091  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14092  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14093 
14094  /* "ADR.pyx":722
14095  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
14096  * if massLumping:
14097  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14098  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14099  * for I in self.coefficients.elementIntegralKeys:
14100  */
14101  }
14102  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14103 
14104  /* "ADR.pyx":724
14105  * for ci in self.coefficients.mass.keys():
14106  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14107  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14108  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14109  * if reactionLumping:
14110  */
14111  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 724, __pyx_L1_error)
14112  __Pyx_GOTREF(__pyx_t_6);
14113  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
14114  __Pyx_GOTREF(__pyx_t_2);
14115  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14116  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
14117  __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
14118  __pyx_t_5 = NULL;
14119  } else {
14120  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 724, __pyx_L1_error)
14121  __Pyx_GOTREF(__pyx_t_6);
14122  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 724, __pyx_L1_error)
14123  }
14124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14125  for (;;) {
14126  if (likely(!__pyx_t_5)) {
14127  if (likely(PyList_CheckExact(__pyx_t_6))) {
14128  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
14129  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14130  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
14131  #else
14132  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
14133  __Pyx_GOTREF(__pyx_t_2);
14134  #endif
14135  } else {
14136  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
14137  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14138  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
14139  #else
14140  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 724, __pyx_L1_error)
14141  __Pyx_GOTREF(__pyx_t_2);
14142  #endif
14143  }
14144  } else {
14145  __pyx_t_2 = __pyx_t_5(__pyx_t_6);
14146  if (unlikely(!__pyx_t_2)) {
14147  PyObject* exc_type = PyErr_Occurred();
14148  if (exc_type) {
14149  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14150  else __PYX_ERR(0, 724, __pyx_L1_error)
14151  }
14152  break;
14153  }
14154  __Pyx_GOTREF(__pyx_t_2);
14155  }
14156  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_2);
14157  __pyx_t_2 = 0;
14158 
14159  /* "ADR.pyx":725
14160  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14161  * for I in self.coefficients.elementIntegralKeys:
14162  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14163  * if reactionLumping:
14164  * for ci in self.coefficients.mass.keys():
14165  */
14166  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 725, __pyx_L1_error)
14167  __Pyx_GOTREF(__pyx_t_14);
14168  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
14169  __Pyx_GOTREF(__pyx_t_1);
14170  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14171  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 725, __pyx_L1_error)
14172  __Pyx_GOTREF(__pyx_t_14);
14173  __pyx_t_7 = NULL;
14174  __pyx_t_13 = 0;
14175  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
14176  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
14177  if (likely(__pyx_t_7)) {
14178  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
14179  __Pyx_INCREF(__pyx_t_7);
14180  __Pyx_INCREF(function);
14181  __Pyx_DECREF_SET(__pyx_t_1, function);
14182  __pyx_t_13 = 1;
14183  }
14184  }
14185  #if CYTHON_FAST_PYCALL
14186  if (PyFunction_Check(__pyx_t_1)) {
14187  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_int_1};
14188  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
14189  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14190  __Pyx_GOTREF(__pyx_t_2);
14191  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14192  } else
14193  #endif
14194  #if CYTHON_FAST_PYCCALL
14195  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
14196  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_int_1};
14197  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
14198  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14199  __Pyx_GOTREF(__pyx_t_2);
14200  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14201  } else
14202  #endif
14203  {
14204  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
14205  __Pyx_GOTREF(__pyx_t_8);
14206  if (__pyx_t_7) {
14207  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
14208  }
14209  __Pyx_GIVEREF(__pyx_t_14);
14210  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_14);
14211  __Pyx_INCREF(__pyx_int_1);
14212  __Pyx_GIVEREF(__pyx_int_1);
14213  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_int_1);
14214  __pyx_t_14 = 0;
14215  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
14216  __Pyx_GOTREF(__pyx_t_2);
14217  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14218  }
14219  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14220  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__24, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
14221  __Pyx_GOTREF(__pyx_t_1);
14222  __pyx_t_8 = PyNumber_Add(__pyx_tuple__23, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error)
14223  __Pyx_GOTREF(__pyx_t_8);
14224  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14225  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_8, __pyx_t_2) < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
14226  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14227  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14228 
14229  /* "ADR.pyx":724
14230  * for ci in self.coefficients.mass.keys():
14231  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14232  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14233  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14234  * if reactionLumping:
14235  */
14236  }
14237  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14238 
14239  /* "ADR.pyx":721
14240  * else:
14241  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
14242  * if massLumping: # <<<<<<<<<<<<<<
14243  * for ci in self.coefficients.mass.keys():
14244  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14245  */
14246  }
14247 
14248  /* "ADR.pyx":726
14249  * for I in self.coefficients.elementIntegralKeys:
14250  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14251  * if reactionLumping: # <<<<<<<<<<<<<<
14252  * for ci in self.coefficients.mass.keys():
14253  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14254  */
14255  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_reactionLumping); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 726, __pyx_L1_error)
14256  if (__pyx_t_3) {
14257 
14258  /* "ADR.pyx":727
14259  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14260  * if reactionLumping:
14261  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14262  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14263  * for I in self.coefficients.elementIntegralKeys:
14264  */
14265  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
14266  __Pyx_GOTREF(__pyx_t_2);
14267  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_mass); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 727, __pyx_L1_error)
14268  __Pyx_GOTREF(__pyx_t_8);
14269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14270  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
14271  __Pyx_GOTREF(__pyx_t_2);
14272  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14273  __pyx_t_8 = NULL;
14274  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
14275  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
14276  if (likely(__pyx_t_8)) {
14277  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14278  __Pyx_INCREF(__pyx_t_8);
14279  __Pyx_INCREF(function);
14280  __Pyx_DECREF_SET(__pyx_t_2, function);
14281  }
14282  }
14283  if (__pyx_t_8) {
14284  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14285  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14286  } else {
14287  __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14288  }
14289  __Pyx_GOTREF(__pyx_t_6);
14290  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14291  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14292  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
14293  __pyx_t_5 = NULL;
14294  } else {
14295  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
14296  __Pyx_GOTREF(__pyx_t_2);
14297  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error)
14298  }
14299  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14300  for (;;) {
14301  if (likely(!__pyx_t_5)) {
14302  if (likely(PyList_CheckExact(__pyx_t_2))) {
14303  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
14304  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14305  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
14306  #else
14307  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14308  __Pyx_GOTREF(__pyx_t_6);
14309  #endif
14310  } else {
14311  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
14312  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14313  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
14314  #else
14315  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
14316  __Pyx_GOTREF(__pyx_t_6);
14317  #endif
14318  }
14319  } else {
14320  __pyx_t_6 = __pyx_t_5(__pyx_t_2);
14321  if (unlikely(!__pyx_t_6)) {
14322  PyObject* exc_type = PyErr_Occurred();
14323  if (exc_type) {
14324  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14325  else __PYX_ERR(0, 727, __pyx_L1_error)
14326  }
14327  break;
14328  }
14329  __Pyx_GOTREF(__pyx_t_6);
14330  }
14331  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
14332  __pyx_t_6 = 0;
14333 
14334  /* "ADR.pyx":728
14335  * if reactionLumping:
14336  * for ci in self.coefficients.mass.keys():
14337  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14338  * for I in self.coefficients.elementIntegralKeys:
14339  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14340  */
14341  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error)
14342  __Pyx_GOTREF(__pyx_t_8);
14343  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
14344  __Pyx_GOTREF(__pyx_t_1);
14345  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14346  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error)
14347  __Pyx_GOTREF(__pyx_t_8);
14348  __pyx_t_14 = NULL;
14349  __pyx_t_13 = 0;
14350  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
14351  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
14352  if (likely(__pyx_t_14)) {
14353  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
14354  __Pyx_INCREF(__pyx_t_14);
14355  __Pyx_INCREF(function);
14356  __Pyx_DECREF_SET(__pyx_t_1, function);
14357  __pyx_t_13 = 1;
14358  }
14359  }
14360  #if CYTHON_FAST_PYCALL
14361  if (PyFunction_Check(__pyx_t_1)) {
14362  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_8, __pyx_int_1};
14363  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14364  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
14365  __Pyx_GOTREF(__pyx_t_6);
14366  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14367  } else
14368  #endif
14369  #if CYTHON_FAST_PYCCALL
14370  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
14371  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_8, __pyx_int_1};
14372  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14373  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
14374  __Pyx_GOTREF(__pyx_t_6);
14375  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14376  } else
14377  #endif
14378  {
14379  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error)
14380  __Pyx_GOTREF(__pyx_t_7);
14381  if (__pyx_t_14) {
14382  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); __pyx_t_14 = NULL;
14383  }
14384  __Pyx_GIVEREF(__pyx_t_8);
14385  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
14386  __Pyx_INCREF(__pyx_int_1);
14387  __Pyx_GIVEREF(__pyx_int_1);
14388  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_int_1);
14389  __pyx_t_8 = 0;
14390  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
14391  __Pyx_GOTREF(__pyx_t_6);
14392  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14393  }
14394  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14395  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
14396  __Pyx_GOTREF(__pyx_t_1);
14397  __Pyx_INCREF(__pyx_n_s_r);
14398  __Pyx_GIVEREF(__pyx_n_s_r);
14399  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_r);
14400  __Pyx_INCREF(__pyx_v_ci);
14401  __Pyx_GIVEREF(__pyx_v_ci);
14402  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
14403  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_1, __pyx_t_6) < 0)) __PYX_ERR(0, 728, __pyx_L1_error)
14404  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14405  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14406 
14407  /* "ADR.pyx":727
14408  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14409  * if reactionLumping:
14410  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14411  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14412  * for I in self.coefficients.elementIntegralKeys:
14413  */
14414  }
14415  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14416 
14417  /* "ADR.pyx":729
14418  * for ci in self.coefficients.mass.keys():
14419  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14420  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14421  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14422  * elementBoundaryQuadratureDict={}
14423  */
14424  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
14425  __Pyx_GOTREF(__pyx_t_2);
14426  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14427  __Pyx_GOTREF(__pyx_t_6);
14428  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14429  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14430  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
14431  __pyx_t_5 = NULL;
14432  } else {
14433  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
14434  __Pyx_GOTREF(__pyx_t_2);
14435  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
14436  }
14437  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14438  for (;;) {
14439  if (likely(!__pyx_t_5)) {
14440  if (likely(PyList_CheckExact(__pyx_t_2))) {
14441  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
14442  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14443  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
14444  #else
14445  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14446  __Pyx_GOTREF(__pyx_t_6);
14447  #endif
14448  } else {
14449  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
14450  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14451  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
14452  #else
14453  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
14454  __Pyx_GOTREF(__pyx_t_6);
14455  #endif
14456  }
14457  } else {
14458  __pyx_t_6 = __pyx_t_5(__pyx_t_2);
14459  if (unlikely(!__pyx_t_6)) {
14460  PyObject* exc_type = PyErr_Occurred();
14461  if (exc_type) {
14462  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14463  else __PYX_ERR(0, 729, __pyx_L1_error)
14464  }
14465  break;
14466  }
14467  __Pyx_GOTREF(__pyx_t_6);
14468  }
14469  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14470  __pyx_t_6 = 0;
14471 
14472  /* "ADR.pyx":730
14473  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14474  * for I in self.coefficients.elementIntegralKeys:
14475  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14476  * elementBoundaryQuadratureDict={}
14477  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14478  */
14479  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
14480  __Pyx_GOTREF(__pyx_t_1);
14481  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 730, __pyx_L1_error)
14482  __Pyx_GOTREF(__pyx_t_7);
14483  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14484  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
14485  __Pyx_GOTREF(__pyx_t_1);
14486  __pyx_t_8 = NULL;
14487  __pyx_t_13 = 0;
14488  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
14489  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
14490  if (likely(__pyx_t_8)) {
14491  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
14492  __Pyx_INCREF(__pyx_t_8);
14493  __Pyx_INCREF(function);
14494  __Pyx_DECREF_SET(__pyx_t_7, function);
14495  __pyx_t_13 = 1;
14496  }
14497  }
14498  #if CYTHON_FAST_PYCALL
14499  if (PyFunction_Check(__pyx_t_7)) {
14500  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_int_1};
14501  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14502  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14503  __Pyx_GOTREF(__pyx_t_6);
14504  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14505  } else
14506  #endif
14507  #if CYTHON_FAST_PYCCALL
14508  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
14509  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_int_1};
14510  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14511  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
14512  __Pyx_GOTREF(__pyx_t_6);
14513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14514  } else
14515  #endif
14516  {
14517  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 730, __pyx_L1_error)
14518  __Pyx_GOTREF(__pyx_t_14);
14519  if (__pyx_t_8) {
14520  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
14521  }
14522  __Pyx_GIVEREF(__pyx_t_1);
14523  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_1);
14524  __Pyx_INCREF(__pyx_int_1);
14525  __Pyx_GIVEREF(__pyx_int_1);
14526  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_int_1);
14527  __pyx_t_1 = 0;
14528  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
14529  __Pyx_GOTREF(__pyx_t_6);
14530  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14531  }
14532  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14533  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__26, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 730, __pyx_L1_error)
14534  __Pyx_GOTREF(__pyx_t_7);
14535  __pyx_t_14 = PyNumber_Add(__pyx_tuple__25, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 730, __pyx_L1_error)
14536  __Pyx_GOTREF(__pyx_t_14);
14537  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14538  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_14, __pyx_t_6) < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
14539  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14540  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14541 
14542  /* "ADR.pyx":729
14543  * for ci in self.coefficients.mass.keys():
14544  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14545  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14546  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14547  * elementBoundaryQuadratureDict={}
14548  */
14549  }
14550  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14551 
14552  /* "ADR.pyx":726
14553  * for I in self.coefficients.elementIntegralKeys:
14554  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14555  * if reactionLumping: # <<<<<<<<<<<<<<
14556  * for ci in self.coefficients.mass.keys():
14557  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14558  */
14559  }
14560 
14561  /* "ADR.pyx":731
14562  * for I in self.coefficients.elementIntegralKeys:
14563  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14564  * elementBoundaryQuadratureDict={} # <<<<<<<<<<<<<<
14565  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14566  * for I in self.coefficients.elementBoundaryIntegralKeys:
14567  */
14568  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error)
14569  __Pyx_GOTREF(__pyx_t_2);
14570  __pyx_v_elementBoundaryQuadratureDict = ((PyObject*)__pyx_t_2);
14571  __pyx_t_2 = 0;
14572 
14573  /* "ADR.pyx":732
14574  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14575  * elementBoundaryQuadratureDict={}
14576  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14577  * for I in self.coefficients.elementBoundaryIntegralKeys:
14578  * if elementBoundaryQuadrature.has_key(I):
14579  */
14580  __pyx_t_3 = PyDict_Check(__pyx_v_elementBoundaryQuadrature);
14581  __pyx_t_15 = (__pyx_t_3 != 0);
14582  if (__pyx_t_15) {
14583 
14584  /* "ADR.pyx":733
14585  * elementBoundaryQuadratureDict={}
14586  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14587  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14588  * if elementBoundaryQuadrature.has_key(I):
14589  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14590  */
14591  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
14592  __Pyx_GOTREF(__pyx_t_2);
14593  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14594  __Pyx_GOTREF(__pyx_t_6);
14595  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14596  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14597  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
14598  __pyx_t_5 = NULL;
14599  } else {
14600  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
14601  __Pyx_GOTREF(__pyx_t_2);
14602  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error)
14603  }
14604  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14605  for (;;) {
14606  if (likely(!__pyx_t_5)) {
14607  if (likely(PyList_CheckExact(__pyx_t_2))) {
14608  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
14609  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14610  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
14611  #else
14612  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14613  __Pyx_GOTREF(__pyx_t_6);
14614  #endif
14615  } else {
14616  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
14617  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14618  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
14619  #else
14620  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
14621  __Pyx_GOTREF(__pyx_t_6);
14622  #endif
14623  }
14624  } else {
14625  __pyx_t_6 = __pyx_t_5(__pyx_t_2);
14626  if (unlikely(!__pyx_t_6)) {
14627  PyObject* exc_type = PyErr_Occurred();
14628  if (exc_type) {
14629  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14630  else __PYX_ERR(0, 733, __pyx_L1_error)
14631  }
14632  break;
14633  }
14634  __Pyx_GOTREF(__pyx_t_6);
14635  }
14636  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14637  __pyx_t_6 = 0;
14638 
14639  /* "ADR.pyx":734
14640  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14641  * for I in self.coefficients.elementBoundaryIntegralKeys:
14642  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14643  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14644  * else:
14645  */
14646  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 734, __pyx_L1_error)
14647  __Pyx_GOTREF(__pyx_t_14);
14648  __pyx_t_7 = NULL;
14649  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
14650  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
14651  if (likely(__pyx_t_7)) {
14652  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
14653  __Pyx_INCREF(__pyx_t_7);
14654  __Pyx_INCREF(function);
14655  __Pyx_DECREF_SET(__pyx_t_14, function);
14656  }
14657  }
14658  if (!__pyx_t_7) {
14659  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14660  __Pyx_GOTREF(__pyx_t_6);
14661  } else {
14662  #if CYTHON_FAST_PYCALL
14663  if (PyFunction_Check(__pyx_t_14)) {
14664  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_I};
14665  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14666  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14667  __Pyx_GOTREF(__pyx_t_6);
14668  } else
14669  #endif
14670  #if CYTHON_FAST_PYCCALL
14671  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
14672  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_I};
14673  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14674  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14675  __Pyx_GOTREF(__pyx_t_6);
14676  } else
14677  #endif
14678  {
14679  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
14680  __Pyx_GOTREF(__pyx_t_1);
14681  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
14682  __Pyx_INCREF(__pyx_v_I);
14683  __Pyx_GIVEREF(__pyx_v_I);
14684  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_I);
14685  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
14686  __Pyx_GOTREF(__pyx_t_6);
14687  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14688  }
14689  }
14690  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14691  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
14692  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14693  if (__pyx_t_15) {
14694 
14695  /* "ADR.pyx":735
14696  * for I in self.coefficients.elementBoundaryIntegralKeys:
14697  * if elementBoundaryQuadrature.has_key(I):
14698  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I] # <<<<<<<<<<<<<<
14699  * else:
14700  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14701  */
14702  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
14703  __Pyx_GOTREF(__pyx_t_6);
14704  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
14705  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14706 
14707  /* "ADR.pyx":734
14708  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14709  * for I in self.coefficients.elementBoundaryIntegralKeys:
14710  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14711  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14712  * else:
14713  */
14714  goto __pyx_L81;
14715  }
14716 
14717  /* "ADR.pyx":737
14718  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14719  * else:
14720  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default'] # <<<<<<<<<<<<<<
14721  * else:
14722  * for I in self.coefficients.elementBoundaryIntegralKeys:
14723  */
14724  /*else*/ {
14725  __pyx_t_6 = PyObject_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
14726  __Pyx_GOTREF(__pyx_t_6);
14727  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
14728  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14729  }
14730  __pyx_L81:;
14731 
14732  /* "ADR.pyx":733
14733  * elementBoundaryQuadratureDict={}
14734  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14735  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14736  * if elementBoundaryQuadrature.has_key(I):
14737  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14738  */
14739  }
14740  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14741 
14742  /* "ADR.pyx":732
14743  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14744  * elementBoundaryQuadratureDict={}
14745  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14746  * for I in self.coefficients.elementBoundaryIntegralKeys:
14747  * if elementBoundaryQuadrature.has_key(I):
14748  */
14749  goto __pyx_L78;
14750  }
14751 
14752  /* "ADR.pyx":739
14753  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14754  * else:
14755  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14756  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14757  * #
14758  */
14759  /*else*/ {
14760  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
14761  __Pyx_GOTREF(__pyx_t_2);
14762  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14763  __Pyx_GOTREF(__pyx_t_6);
14764  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14765  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14766  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
14767  __pyx_t_5 = NULL;
14768  } else {
14769  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
14770  __Pyx_GOTREF(__pyx_t_2);
14771  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error)
14772  }
14773  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14774  for (;;) {
14775  if (likely(!__pyx_t_5)) {
14776  if (likely(PyList_CheckExact(__pyx_t_2))) {
14777  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
14778  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14779  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
14780  #else
14781  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14782  __Pyx_GOTREF(__pyx_t_6);
14783  #endif
14784  } else {
14785  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
14786  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14787  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
14788  #else
14789  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 739, __pyx_L1_error)
14790  __Pyx_GOTREF(__pyx_t_6);
14791  #endif
14792  }
14793  } else {
14794  __pyx_t_6 = __pyx_t_5(__pyx_t_2);
14795  if (unlikely(!__pyx_t_6)) {
14796  PyObject* exc_type = PyErr_Occurred();
14797  if (exc_type) {
14798  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14799  else __PYX_ERR(0, 739, __pyx_L1_error)
14800  }
14801  break;
14802  }
14803  __Pyx_GOTREF(__pyx_t_6);
14804  }
14805  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14806  __pyx_t_6 = 0;
14807 
14808  /* "ADR.pyx":740
14809  * else:
14810  * for I in self.coefficients.elementBoundaryIntegralKeys:
14811  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature # <<<<<<<<<<<<<<
14812  * #
14813  * # find the union of all element quadrature points and
14814  */
14815  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_v_elementBoundaryQuadrature) < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
14816 
14817  /* "ADR.pyx":739
14818  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14819  * else:
14820  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14821  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14822  * #
14823  */
14824  }
14825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14826  }
14827  __pyx_L78:;
14828 
14829  /* "ADR.pyx":747
14830  * #mwf include tag telling me which indices are which quadrature rule?
14831  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14832  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14833  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14834  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14835  */
14836  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 747, __pyx_L1_error)
14837  __Pyx_GOTREF(__pyx_t_6);
14838  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 747, __pyx_L1_error)
14839  __Pyx_GOTREF(__pyx_t_14);
14840  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14841  __pyx_t_6 = NULL;
14842  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
14843  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_14);
14844  if (likely(__pyx_t_6)) {
14845  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
14846  __Pyx_INCREF(__pyx_t_6);
14847  __Pyx_INCREF(function);
14848  __Pyx_DECREF_SET(__pyx_t_14, function);
14849  }
14850  }
14851  if (!__pyx_t_6) {
14852  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_elementQuadratureDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
14853  __Pyx_GOTREF(__pyx_t_2);
14854  } else {
14855  #if CYTHON_FAST_PYCALL
14856  if (PyFunction_Check(__pyx_t_14)) {
14857  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_elementQuadratureDict};
14858  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
14859  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14860  __Pyx_GOTREF(__pyx_t_2);
14861  } else
14862  #endif
14863  #if CYTHON_FAST_PYCCALL
14864  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
14865  PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_elementQuadratureDict};
14866  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
14867  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14868  __Pyx_GOTREF(__pyx_t_2);
14869  } else
14870  #endif
14871  {
14872  __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
14873  __Pyx_GOTREF(__pyx_t_1);
14874  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
14875  __Pyx_INCREF(__pyx_v_elementQuadratureDict);
14876  __Pyx_GIVEREF(__pyx_v_elementQuadratureDict);
14877  PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_elementQuadratureDict);
14878  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
14879  __Pyx_GOTREF(__pyx_t_2);
14880  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14881  }
14882  }
14883  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14884  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
14885  PyObject* sequence = __pyx_t_2;
14886  #if !CYTHON_COMPILING_IN_PYPY
14887  Py_ssize_t size = Py_SIZE(sequence);
14888  #else
14889  Py_ssize_t size = PySequence_Size(sequence);
14890  #endif
14891  if (unlikely(size != 3)) {
14892  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
14893  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
14894  __PYX_ERR(0, 746, __pyx_L1_error)
14895  }
14896  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14897  if (likely(PyTuple_CheckExact(sequence))) {
14898  __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0);
14899  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
14900  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
14901  } else {
14902  __pyx_t_14 = PyList_GET_ITEM(sequence, 0);
14903  __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
14904  __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
14905  }
14906  __Pyx_INCREF(__pyx_t_14);
14907  __Pyx_INCREF(__pyx_t_1);
14908  __Pyx_INCREF(__pyx_t_6);
14909  #else
14910  __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 746, __pyx_L1_error)
14911  __Pyx_GOTREF(__pyx_t_14);
14912  __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
14913  __Pyx_GOTREF(__pyx_t_1);
14914  __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 746, __pyx_L1_error)
14915  __Pyx_GOTREF(__pyx_t_6);
14916  #endif
14917  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14918  } else {
14919  Py_ssize_t index = -1;
14920  __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 746, __pyx_L1_error)
14921  __Pyx_GOTREF(__pyx_t_7);
14922  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14923  __pyx_t_16 = Py_TYPE(__pyx_t_7)->tp_iternext;
14924  index = 0; __pyx_t_14 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_14)) goto __pyx_L84_unpacking_failed;
14925  __Pyx_GOTREF(__pyx_t_14);
14926  index = 1; __pyx_t_1 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L84_unpacking_failed;
14927  __Pyx_GOTREF(__pyx_t_1);
14928  index = 2; __pyx_t_6 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L84_unpacking_failed;
14929  __Pyx_GOTREF(__pyx_t_6);
14930  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_7), 3) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14931  __pyx_t_16 = NULL;
14932  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14933  goto __pyx_L85_unpacking_done;
14934  __pyx_L84_unpacking_failed:;
14935  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14936  __pyx_t_16 = NULL;
14937  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
14938  __PYX_ERR(0, 746, __pyx_L1_error)
14939  __pyx_L85_unpacking_done:;
14940  }
14941 
14942  /* "ADR.pyx":746
14943  * # weight at each point in the union
14944  * #mwf include tag telling me which indices are which quadrature rule?
14945  * (self.elementQuadraturePoints,self.elementQuadratureWeights, # <<<<<<<<<<<<<<
14946  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14947  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14948  */
14949  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints, __pyx_t_14) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14950  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
14951  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights, __pyx_t_1) < 0) __PYX_ERR(0, 746, __pyx_L1_error)
14952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14953 
14954  /* "ADR.pyx":747
14955  * #mwf include tag telling me which indices are which quadrature rule?
14956  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14957  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14958  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14959  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14960  */
14961  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureRuleIndeces, __pyx_t_6) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
14962  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14963 
14964  /* "ADR.pyx":748
14965  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14966  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14967  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
14968  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14969  * #
14970  */
14971  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
14972  __Pyx_GOTREF(__pyx_t_2);
14973  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
14974  __Pyx_GOTREF(__pyx_t_6);
14975  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14976  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
14977  __Pyx_GOTREF(__pyx_t_2);
14978  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14979  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element, __pyx_t_2) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
14980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14981 
14982  /* "ADR.pyx":749
14983  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14984  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14985  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global # <<<<<<<<<<<<<<
14986  * #
14987  * #Repeat the same thing for the element boundary quadrature
14988  */
14989  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
14990  __Pyx_GOTREF(__pyx_t_2);
14991  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
14992  __Pyx_GOTREF(__pyx_t_6);
14993  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
14994  __Pyx_GOTREF(__pyx_t_1);
14995  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14996  __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
14997  __Pyx_GOTREF(__pyx_t_6);
14998  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14999  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15000  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_global, __pyx_t_6) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
15001  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15002 
15003  /* "ADR.pyx":755
15004  * (self.elementBoundaryQuadraturePoints,
15005  * self.elementBoundaryQuadratureWeights,
15006  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
15007  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15008  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15009  */
15010  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Quadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
15011  __Pyx_GOTREF(__pyx_t_1);
15012  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
15013  __Pyx_GOTREF(__pyx_t_2);
15014  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15015  __pyx_t_1 = NULL;
15016  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15017  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
15018  if (likely(__pyx_t_1)) {
15019  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15020  __Pyx_INCREF(__pyx_t_1);
15021  __Pyx_INCREF(function);
15022  __Pyx_DECREF_SET(__pyx_t_2, function);
15023  }
15024  }
15025  if (!__pyx_t_1) {
15026  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementBoundaryQuadratureDict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15027  __Pyx_GOTREF(__pyx_t_6);
15028  } else {
15029  #if CYTHON_FAST_PYCALL
15030  if (PyFunction_Check(__pyx_t_2)) {
15031  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_elementBoundaryQuadratureDict};
15032  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15033  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15034  __Pyx_GOTREF(__pyx_t_6);
15035  } else
15036  #endif
15037  #if CYTHON_FAST_PYCCALL
15038  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
15039  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_elementBoundaryQuadratureDict};
15040  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15041  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15042  __Pyx_GOTREF(__pyx_t_6);
15043  } else
15044  #endif
15045  {
15046  __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 755, __pyx_L1_error)
15047  __Pyx_GOTREF(__pyx_t_14);
15048  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL;
15049  __Pyx_INCREF(__pyx_v_elementBoundaryQuadratureDict);
15050  __Pyx_GIVEREF(__pyx_v_elementBoundaryQuadratureDict);
15051  PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_elementBoundaryQuadratureDict);
15052  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
15053  __Pyx_GOTREF(__pyx_t_6);
15054  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15055  }
15056  }
15057  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15058  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
15059  PyObject* sequence = __pyx_t_6;
15060  #if !CYTHON_COMPILING_IN_PYPY
15061  Py_ssize_t size = Py_SIZE(sequence);
15062  #else
15063  Py_ssize_t size = PySequence_Size(sequence);
15064  #endif
15065  if (unlikely(size != 3)) {
15066  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
15067  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15068  __PYX_ERR(0, 753, __pyx_L1_error)
15069  }
15070  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15071  if (likely(PyTuple_CheckExact(sequence))) {
15072  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
15073  __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1);
15074  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2);
15075  } else {
15076  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
15077  __pyx_t_14 = PyList_GET_ITEM(sequence, 1);
15078  __pyx_t_1 = PyList_GET_ITEM(sequence, 2);
15079  }
15080  __Pyx_INCREF(__pyx_t_2);
15081  __Pyx_INCREF(__pyx_t_14);
15082  __Pyx_INCREF(__pyx_t_1);
15083  #else
15084  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
15085  __Pyx_GOTREF(__pyx_t_2);
15086  __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 753, __pyx_L1_error)
15087  __Pyx_GOTREF(__pyx_t_14);
15088  __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
15089  __Pyx_GOTREF(__pyx_t_1);
15090  #endif
15091  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15092  } else {
15093  Py_ssize_t index = -1;
15094  __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 753, __pyx_L1_error)
15095  __Pyx_GOTREF(__pyx_t_7);
15096  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15097  __pyx_t_16 = Py_TYPE(__pyx_t_7)->tp_iternext;
15098  index = 0; __pyx_t_2 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L86_unpacking_failed;
15099  __Pyx_GOTREF(__pyx_t_2);
15100  index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_14)) goto __pyx_L86_unpacking_failed;
15101  __Pyx_GOTREF(__pyx_t_14);
15102  index = 2; __pyx_t_1 = __pyx_t_16(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L86_unpacking_failed;
15103  __Pyx_GOTREF(__pyx_t_1);
15104  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_7), 3) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
15105  __pyx_t_16 = NULL;
15106  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15107  goto __pyx_L87_unpacking_done;
15108  __pyx_L86_unpacking_failed:;
15109  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15110  __pyx_t_16 = NULL;
15111  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15112  __PYX_ERR(0, 753, __pyx_L1_error)
15113  __pyx_L87_unpacking_done:;
15114  }
15115 
15116  /* "ADR.pyx":753
15117  * #Repeat the same thing for the element boundary quadrature
15118  * #
15119  * (self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
15120  * self.elementBoundaryQuadratureWeights,
15121  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15122  */
15123  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints, __pyx_t_2) < 0) __PYX_ERR(0, 753, __pyx_L1_error)
15124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15125 
15126  /* "ADR.pyx":754
15127  * #
15128  * (self.elementBoundaryQuadraturePoints,
15129  * self.elementBoundaryQuadratureWeights, # <<<<<<<<<<<<<<
15130  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15131  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15132  */
15133  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights, __pyx_t_14) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
15134  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15135 
15136  /* "ADR.pyx":755
15137  * (self.elementBoundaryQuadraturePoints,
15138  * self.elementBoundaryQuadratureWeights,
15139  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
15140  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15141  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15142  */
15143  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_t_1) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
15144  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15145 
15146  /* "ADR.pyx":756
15147  * self.elementBoundaryQuadratureWeights,
15148  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15149  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
15150  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15151  * self.mesh.nElementBoundaries_element*
15152  */
15153  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
15154  __Pyx_GOTREF(__pyx_t_6);
15155  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
15156  __Pyx_GOTREF(__pyx_t_1);
15157  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15158  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
15159  __Pyx_GOTREF(__pyx_t_6);
15160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15161  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_t_6) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
15162  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15163 
15164  /* "ADR.pyx":757
15165  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15166  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15167  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15168  * self.mesh.nElementBoundaries_element*
15169  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15170  */
15171  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
15172  __Pyx_GOTREF(__pyx_t_6);
15173  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
15174  __Pyx_GOTREF(__pyx_t_1);
15175  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15176 
15177  /* "ADR.pyx":758
15178  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15179  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15180  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
15181  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15182  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15183  */
15184  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error)
15185  __Pyx_GOTREF(__pyx_t_6);
15186  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 758, __pyx_L1_error)
15187  __Pyx_GOTREF(__pyx_t_14);
15188  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15189 
15190  /* "ADR.pyx":757
15191  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15192  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15193  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15194  * self.mesh.nElementBoundaries_element*
15195  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15196  */
15197  __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
15198  __Pyx_GOTREF(__pyx_t_6);
15199  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15200  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15201 
15202  /* "ADR.pyx":759
15203  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15204  * self.mesh.nElementBoundaries_element*
15205  * self.nElementBoundaryQuadraturePoints_elementBoundary) # <<<<<<<<<<<<<<
15206  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15207  * if self.nSpace_global == 3:
15208  */
15209  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 759, __pyx_L1_error)
15210  __Pyx_GOTREF(__pyx_t_14);
15211 
15212  /* "ADR.pyx":758
15213  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15214  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
15215  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
15216  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15217  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15218  */
15219  __pyx_t_1 = PyNumber_Multiply(__pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
15220  __Pyx_GOTREF(__pyx_t_1);
15221  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15222  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15223 
15224  /* "ADR.pyx":757
15225  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
15226  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
15227  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
15228  * self.mesh.nElementBoundaries_element*
15229  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15230  */
15231  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_t_1) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
15232  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15233 
15234  /* "ADR.pyx":760
15235  * self.mesh.nElementBoundaries_element*
15236  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15237  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
15238  * if self.nSpace_global == 3:
15239  * assert(self.nQuadraturePoints_element == 5)
15240  */
15241  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
15242  __Pyx_GOTREF(__pyx_t_1);
15243  __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 760, __pyx_L1_error)
15244  __Pyx_GOTREF(__pyx_t_14);
15245  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15246  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
15247  __Pyx_GOTREF(__pyx_t_1);
15248  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15249  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 760, __pyx_L1_error)
15250  __Pyx_GOTREF(__pyx_t_14);
15251  __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_1)), __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
15252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15253  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15254  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 760, __pyx_L1_error)
15255  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15256  if (__pyx_t_15) {
15257 
15258  /* "ADR.pyx":761
15259  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15260  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15261  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15262  * assert(self.nQuadraturePoints_element == 5)
15263  * elif self.nSpace_global == 2:
15264  */
15265  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
15266  __Pyx_GOTREF(__pyx_t_6);
15267  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 761, __pyx_L1_error)
15268  __Pyx_GOTREF(__pyx_t_14);
15269  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15270  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
15271  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15272  if (__pyx_t_15) {
15273 
15274  /* "ADR.pyx":762
15275  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15276  * if self.nSpace_global == 3:
15277  * assert(self.nQuadraturePoints_element == 5) # <<<<<<<<<<<<<<
15278  * elif self.nSpace_global == 2:
15279  * assert(self.nQuadraturePoints_element == 6)
15280  */
15281  #ifndef CYTHON_WITHOUT_ASSERTIONS
15282  if (unlikely(!Py_OptimizeFlag)) {
15283  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 762, __pyx_L1_error)
15284  __Pyx_GOTREF(__pyx_t_14);
15285  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
15286  __Pyx_GOTREF(__pyx_t_6);
15287  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15288  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
15289  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15290  if (unlikely(!__pyx_t_15)) {
15291  PyErr_SetNone(PyExc_AssertionError);
15292  __PYX_ERR(0, 762, __pyx_L1_error)
15293  }
15294  }
15295  #endif
15296 
15297  /* "ADR.pyx":761
15298  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15299  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15300  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15301  * assert(self.nQuadraturePoints_element == 5)
15302  * elif self.nSpace_global == 2:
15303  */
15304  goto __pyx_L89;
15305  }
15306 
15307  /* "ADR.pyx":763
15308  * if self.nSpace_global == 3:
15309  * assert(self.nQuadraturePoints_element == 5)
15310  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15311  * assert(self.nQuadraturePoints_element == 6)
15312  * elif self.nSpace_global == 1:
15313  */
15314  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
15315  __Pyx_GOTREF(__pyx_t_6);
15316  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 763, __pyx_L1_error)
15317  __Pyx_GOTREF(__pyx_t_14);
15318  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15319  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 763, __pyx_L1_error)
15320  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15321  if (__pyx_t_15) {
15322 
15323  /* "ADR.pyx":764
15324  * assert(self.nQuadraturePoints_element == 5)
15325  * elif self.nSpace_global == 2:
15326  * assert(self.nQuadraturePoints_element == 6) # <<<<<<<<<<<<<<
15327  * elif self.nSpace_global == 1:
15328  * assert(self.nQuadraturePoints_element == 3)
15329  */
15330  #ifndef CYTHON_WITHOUT_ASSERTIONS
15331  if (unlikely(!Py_OptimizeFlag)) {
15332  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 764, __pyx_L1_error)
15333  __Pyx_GOTREF(__pyx_t_14);
15334  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error)
15335  __Pyx_GOTREF(__pyx_t_6);
15336  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15337  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 764, __pyx_L1_error)
15338  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15339  if (unlikely(!__pyx_t_15)) {
15340  PyErr_SetNone(PyExc_AssertionError);
15341  __PYX_ERR(0, 764, __pyx_L1_error)
15342  }
15343  }
15344  #endif
15345 
15346  /* "ADR.pyx":763
15347  * if self.nSpace_global == 3:
15348  * assert(self.nQuadraturePoints_element == 5)
15349  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15350  * assert(self.nQuadraturePoints_element == 6)
15351  * elif self.nSpace_global == 1:
15352  */
15353  goto __pyx_L89;
15354  }
15355 
15356  /* "ADR.pyx":765
15357  * elif self.nSpace_global == 2:
15358  * assert(self.nQuadraturePoints_element == 6)
15359  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15360  * assert(self.nQuadraturePoints_element == 3)
15361  *
15362  */
15363  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error)
15364  __Pyx_GOTREF(__pyx_t_6);
15365  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 765, __pyx_L1_error)
15366  __Pyx_GOTREF(__pyx_t_14);
15367  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15368  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 765, __pyx_L1_error)
15369  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15370  if (__pyx_t_15) {
15371 
15372  /* "ADR.pyx":766
15373  * assert(self.nQuadraturePoints_element == 6)
15374  * elif self.nSpace_global == 1:
15375  * assert(self.nQuadraturePoints_element == 3) # <<<<<<<<<<<<<<
15376  *
15377  * if self.nSpace_global == 3:
15378  */
15379  #ifndef CYTHON_WITHOUT_ASSERTIONS
15380  if (unlikely(!Py_OptimizeFlag)) {
15381  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 766, __pyx_L1_error)
15382  __Pyx_GOTREF(__pyx_t_14);
15383  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
15384  __Pyx_GOTREF(__pyx_t_6);
15385  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15386  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
15387  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15388  if (unlikely(!__pyx_t_15)) {
15389  PyErr_SetNone(PyExc_AssertionError);
15390  __PYX_ERR(0, 766, __pyx_L1_error)
15391  }
15392  }
15393  #endif
15394 
15395  /* "ADR.pyx":765
15396  * elif self.nSpace_global == 2:
15397  * assert(self.nQuadraturePoints_element == 6)
15398  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15399  * assert(self.nQuadraturePoints_element == 3)
15400  *
15401  */
15402  }
15403  __pyx_L89:;
15404 
15405  /* "ADR.pyx":768
15406  * assert(self.nQuadraturePoints_element == 3)
15407  *
15408  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15409  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15410  * elif self.nSpace_global == 2:
15411  */
15412  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 768, __pyx_L1_error)
15413  __Pyx_GOTREF(__pyx_t_6);
15414  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 768, __pyx_L1_error)
15415  __Pyx_GOTREF(__pyx_t_14);
15416  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15417  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 768, __pyx_L1_error)
15418  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15419  if (__pyx_t_15) {
15420 
15421  /* "ADR.pyx":769
15422  *
15423  * if self.nSpace_global == 3:
15424  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15425  * elif self.nSpace_global == 2:
15426  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15427  */
15428  #ifndef CYTHON_WITHOUT_ASSERTIONS
15429  if (unlikely(!Py_OptimizeFlag)) {
15430  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 769, __pyx_L1_error)
15431  __Pyx_GOTREF(__pyx_t_14);
15432  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
15433  __Pyx_GOTREF(__pyx_t_6);
15434  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15435  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 769, __pyx_L1_error)
15436  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15437  if (unlikely(!__pyx_t_15)) {
15438  PyErr_SetNone(PyExc_AssertionError);
15439  __PYX_ERR(0, 769, __pyx_L1_error)
15440  }
15441  }
15442  #endif
15443 
15444  /* "ADR.pyx":768
15445  * assert(self.nQuadraturePoints_element == 3)
15446  *
15447  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15448  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15449  * elif self.nSpace_global == 2:
15450  */
15451  goto __pyx_L90;
15452  }
15453 
15454  /* "ADR.pyx":770
15455  * if self.nSpace_global == 3:
15456  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15457  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15458  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15459  * elif self.nSpace_global == 1:
15460  */
15461  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
15462  __Pyx_GOTREF(__pyx_t_6);
15463  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 770, __pyx_L1_error)
15464  __Pyx_GOTREF(__pyx_t_14);
15465  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15466  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 770, __pyx_L1_error)
15467  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15468  if (__pyx_t_15) {
15469 
15470  /* "ADR.pyx":771
15471  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15472  * elif self.nSpace_global == 2:
15473  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15474  * elif self.nSpace_global == 1:
15475  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15476  */
15477  #ifndef CYTHON_WITHOUT_ASSERTIONS
15478  if (unlikely(!Py_OptimizeFlag)) {
15479  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 771, __pyx_L1_error)
15480  __Pyx_GOTREF(__pyx_t_14);
15481  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
15482  __Pyx_GOTREF(__pyx_t_6);
15483  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15484  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 771, __pyx_L1_error)
15485  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15486  if (unlikely(!__pyx_t_15)) {
15487  PyErr_SetNone(PyExc_AssertionError);
15488  __PYX_ERR(0, 771, __pyx_L1_error)
15489  }
15490  }
15491  #endif
15492 
15493  /* "ADR.pyx":770
15494  * if self.nSpace_global == 3:
15495  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15496  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15497  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15498  * elif self.nSpace_global == 1:
15499  */
15500  goto __pyx_L90;
15501  }
15502 
15503  /* "ADR.pyx":772
15504  * elif self.nSpace_global == 2:
15505  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15506  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15507  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15508  *
15509  */
15510  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
15511  __Pyx_GOTREF(__pyx_t_6);
15512  __pyx_t_14 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 772, __pyx_L1_error)
15513  __Pyx_GOTREF(__pyx_t_14);
15514  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15515  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 772, __pyx_L1_error)
15516  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15517  if (__pyx_t_15) {
15518 
15519  /* "ADR.pyx":773
15520  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15521  * elif self.nSpace_global == 1:
15522  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1) # <<<<<<<<<<<<<<
15523  *
15524  * #pdb.set_trace()
15525  */
15526  #ifndef CYTHON_WITHOUT_ASSERTIONS
15527  if (unlikely(!Py_OptimizeFlag)) {
15528  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 773, __pyx_L1_error)
15529  __Pyx_GOTREF(__pyx_t_14);
15530  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_14, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
15531  __Pyx_GOTREF(__pyx_t_6);
15532  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15533  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 773, __pyx_L1_error)
15534  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15535  if (unlikely(!__pyx_t_15)) {
15536  PyErr_SetNone(PyExc_AssertionError);
15537  __PYX_ERR(0, 773, __pyx_L1_error)
15538  }
15539  }
15540  #endif
15541 
15542  /* "ADR.pyx":772
15543  * elif self.nSpace_global == 2:
15544  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15545  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15546  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15547  *
15548  */
15549  }
15550  __pyx_L90:;
15551 
15552  /* "ADR.pyx":760
15553  * self.mesh.nElementBoundaries_element*
15554  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15555  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
15556  * if self.nSpace_global == 3:
15557  * assert(self.nQuadraturePoints_element == 5)
15558  */
15559  }
15560 
15561  /* "ADR.pyx":779
15562  * #simplified allocations for test==trial and also check if space is mixed or not
15563  * #
15564  * self.q={} # <<<<<<<<<<<<<<
15565  * self.ebq={}
15566  * self.ebq_global={}
15567  */
15568  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error)
15569  __Pyx_GOTREF(__pyx_t_6);
15570  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_q, __pyx_t_6) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
15571  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15572 
15573  /* "ADR.pyx":780
15574  * #
15575  * self.q={}
15576  * self.ebq={} # <<<<<<<<<<<<<<
15577  * self.ebq_global={}
15578  * self.ebqe={}
15579  */
15580  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L1_error)
15581  __Pyx_GOTREF(__pyx_t_6);
15582  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq, __pyx_t_6) < 0) __PYX_ERR(0, 780, __pyx_L1_error)
15583  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15584 
15585  /* "ADR.pyx":781
15586  * self.q={}
15587  * self.ebq={}
15588  * self.ebq_global={} # <<<<<<<<<<<<<<
15589  * self.ebqe={}
15590  * self.phi_ip={}
15591  */
15592  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error)
15593  __Pyx_GOTREF(__pyx_t_6);
15594  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global, __pyx_t_6) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
15595  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15596 
15597  /* "ADR.pyx":782
15598  * self.ebq={}
15599  * self.ebq_global={}
15600  * self.ebqe={} # <<<<<<<<<<<<<<
15601  * self.phi_ip={}
15602  * #mesh
15603  */
15604  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 782, __pyx_L1_error)
15605  __Pyx_GOTREF(__pyx_t_6);
15606  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebqe, __pyx_t_6) < 0) __PYX_ERR(0, 782, __pyx_L1_error)
15607  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15608 
15609  /* "ADR.pyx":783
15610  * self.ebq_global={}
15611  * self.ebqe={}
15612  * self.phi_ip={} # <<<<<<<<<<<<<<
15613  * #mesh
15614  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15615  */
15616  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
15617  __Pyx_GOTREF(__pyx_t_6);
15618  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi_ip, __pyx_t_6) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
15619  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15620 
15621  /* "ADR.pyx":785
15622  * self.phi_ip={}
15623  * #mesh
15624  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d') # <<<<<<<<<<<<<<
15625  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15626  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15627  */
15628  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 785, __pyx_L1_error)
15629  __Pyx_GOTREF(__pyx_t_14);
15630  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
15631  __Pyx_GOTREF(__pyx_t_1);
15632  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15633  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 785, __pyx_L1_error)
15634  __Pyx_GOTREF(__pyx_t_14);
15635  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
15636  __Pyx_GOTREF(__pyx_t_2);
15637  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15638  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 785, __pyx_L1_error)
15639  __Pyx_GOTREF(__pyx_t_14);
15640  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error)
15641  __Pyx_GOTREF(__pyx_t_7);
15642  __Pyx_GIVEREF(__pyx_t_2);
15643  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
15644  __Pyx_GIVEREF(__pyx_t_14);
15645  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_14);
15646  __Pyx_INCREF(__pyx_int_3);
15647  __Pyx_GIVEREF(__pyx_int_3);
15648  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_3);
15649  __pyx_t_2 = 0;
15650  __pyx_t_14 = 0;
15651  __pyx_t_14 = NULL;
15652  __pyx_t_13 = 0;
15653  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
15654  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
15655  if (likely(__pyx_t_14)) {
15656  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
15657  __Pyx_INCREF(__pyx_t_14);
15658  __Pyx_INCREF(function);
15659  __Pyx_DECREF_SET(__pyx_t_1, function);
15660  __pyx_t_13 = 1;
15661  }
15662  }
15663  #if CYTHON_FAST_PYCALL
15664  if (PyFunction_Check(__pyx_t_1)) {
15665  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_n_s_d};
15666  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15667  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
15668  __Pyx_GOTREF(__pyx_t_6);
15669  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15670  } else
15671  #endif
15672  #if CYTHON_FAST_PYCCALL
15673  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
15674  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_n_s_d};
15675  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15676  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
15677  __Pyx_GOTREF(__pyx_t_6);
15678  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15679  } else
15680  #endif
15681  {
15682  __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
15683  __Pyx_GOTREF(__pyx_t_2);
15684  if (__pyx_t_14) {
15685  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
15686  }
15687  __Pyx_GIVEREF(__pyx_t_7);
15688  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_7);
15689  __Pyx_INCREF(__pyx_n_s_d);
15690  __Pyx_GIVEREF(__pyx_n_s_d);
15691  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_n_s_d);
15692  __pyx_t_7 = 0;
15693  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
15694  __Pyx_GOTREF(__pyx_t_6);
15695  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15696  }
15697  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15698  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
15699  __Pyx_GOTREF(__pyx_t_1);
15700  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_s_x, __pyx_t_6) < 0)) __PYX_ERR(0, 785, __pyx_L1_error)
15701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15702  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15703 
15704  /* "ADR.pyx":786
15705  * #mesh
15706  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15707  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d') # <<<<<<<<<<<<<<
15708  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15709  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15710  */
15711  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
15712  __Pyx_GOTREF(__pyx_t_1);
15713  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
15714  __Pyx_GOTREF(__pyx_t_2);
15715  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15716  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
15717  __Pyx_GOTREF(__pyx_t_1);
15718  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error)
15719  __Pyx_GOTREF(__pyx_t_7);
15720  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15721  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
15722  __Pyx_GOTREF(__pyx_t_1);
15723  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 786, __pyx_L1_error)
15724  __Pyx_GOTREF(__pyx_t_14);
15725  __Pyx_GIVEREF(__pyx_t_7);
15726  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7);
15727  __Pyx_GIVEREF(__pyx_t_1);
15728  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_1);
15729  __Pyx_INCREF(__pyx_int_3);
15730  __Pyx_GIVEREF(__pyx_int_3);
15731  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_3);
15732  __pyx_t_7 = 0;
15733  __pyx_t_1 = 0;
15734  __pyx_t_1 = NULL;
15735  __pyx_t_13 = 0;
15736  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15737  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
15738  if (likely(__pyx_t_1)) {
15739  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15740  __Pyx_INCREF(__pyx_t_1);
15741  __Pyx_INCREF(function);
15742  __Pyx_DECREF_SET(__pyx_t_2, function);
15743  __pyx_t_13 = 1;
15744  }
15745  }
15746  #if CYTHON_FAST_PYCALL
15747  if (PyFunction_Check(__pyx_t_2)) {
15748  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_14, __pyx_n_s_d};
15749  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15750  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15751  __Pyx_GOTREF(__pyx_t_6);
15752  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15753  } else
15754  #endif
15755  #if CYTHON_FAST_PYCCALL
15756  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
15757  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_14, __pyx_n_s_d};
15758  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15759  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
15760  __Pyx_GOTREF(__pyx_t_6);
15761  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15762  } else
15763  #endif
15764  {
15765  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 786, __pyx_L1_error)
15766  __Pyx_GOTREF(__pyx_t_7);
15767  if (__pyx_t_1) {
15768  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
15769  }
15770  __Pyx_GIVEREF(__pyx_t_14);
15771  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_14);
15772  __Pyx_INCREF(__pyx_n_s_d);
15773  __Pyx_GIVEREF(__pyx_n_s_d);
15774  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
15775  __pyx_t_14 = 0;
15776  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 786, __pyx_L1_error)
15777  __Pyx_GOTREF(__pyx_t_6);
15778  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15779  }
15780  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15781  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)
15782  __Pyx_GOTREF(__pyx_t_2);
15783  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_x, __pyx_t_6) < 0)) __PYX_ERR(0, 786, __pyx_L1_error)
15784  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15785  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15786 
15787  /* "ADR.pyx":787
15788  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15789  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15790  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
15791  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15792  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15793  */
15794  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
15795  __Pyx_GOTREF(__pyx_t_2);
15796  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
15797  __Pyx_GOTREF(__pyx_t_7);
15798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15799  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
15800  __Pyx_GOTREF(__pyx_t_2);
15801  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 787, __pyx_L1_error)
15802  __Pyx_GOTREF(__pyx_t_14);
15803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15804  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
15805  __Pyx_GOTREF(__pyx_t_2);
15806  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
15807  __Pyx_GOTREF(__pyx_t_1);
15808  __Pyx_GIVEREF(__pyx_t_14);
15809  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14);
15810  __Pyx_GIVEREF(__pyx_t_2);
15811  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
15812  __pyx_t_14 = 0;
15813  __pyx_t_2 = 0;
15814  __pyx_t_2 = NULL;
15815  __pyx_t_13 = 0;
15816  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15817  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
15818  if (likely(__pyx_t_2)) {
15819  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
15820  __Pyx_INCREF(__pyx_t_2);
15821  __Pyx_INCREF(function);
15822  __Pyx_DECREF_SET(__pyx_t_7, function);
15823  __pyx_t_13 = 1;
15824  }
15825  }
15826  #if CYTHON_FAST_PYCALL
15827  if (PyFunction_Check(__pyx_t_7)) {
15828  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_n_s_d};
15829  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15830  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15831  __Pyx_GOTREF(__pyx_t_6);
15832  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15833  } else
15834  #endif
15835  #if CYTHON_FAST_PYCCALL
15836  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
15837  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_n_s_d};
15838  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15839  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15840  __Pyx_GOTREF(__pyx_t_6);
15841  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15842  } else
15843  #endif
15844  {
15845  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 787, __pyx_L1_error)
15846  __Pyx_GOTREF(__pyx_t_14);
15847  if (__pyx_t_2) {
15848  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
15849  }
15850  __Pyx_GIVEREF(__pyx_t_1);
15851  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_1);
15852  __Pyx_INCREF(__pyx_n_s_d);
15853  __Pyx_GIVEREF(__pyx_n_s_d);
15854  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_n_s_d);
15855  __pyx_t_1 = 0;
15856  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error)
15857  __Pyx_GOTREF(__pyx_t_6);
15858  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15859  }
15860  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15861  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
15862  __Pyx_GOTREF(__pyx_t_7);
15863  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__27, __pyx_t_6) < 0)) __PYX_ERR(0, 787, __pyx_L1_error)
15864  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15865  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15866 
15867  /* "ADR.pyx":788
15868  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15869  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15870  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
15871  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15872  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15873  */
15874  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
15875  __Pyx_GOTREF(__pyx_t_7);
15876  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 788, __pyx_L1_error)
15877  __Pyx_GOTREF(__pyx_t_14);
15878  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15879  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
15880  __Pyx_GOTREF(__pyx_t_7);
15881  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
15882  __Pyx_GOTREF(__pyx_t_1);
15883  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15884  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
15885  __Pyx_GOTREF(__pyx_t_7);
15886  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
15887  __Pyx_GOTREF(__pyx_t_2);
15888  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
15889  __Pyx_GOTREF(__pyx_t_8);
15890  __Pyx_GIVEREF(__pyx_t_1);
15891  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
15892  __Pyx_GIVEREF(__pyx_t_7);
15893  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
15894  __Pyx_GIVEREF(__pyx_t_2);
15895  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_2);
15896  __pyx_t_1 = 0;
15897  __pyx_t_7 = 0;
15898  __pyx_t_2 = 0;
15899  __pyx_t_2 = NULL;
15900  __pyx_t_13 = 0;
15901  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
15902  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
15903  if (likely(__pyx_t_2)) {
15904  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
15905  __Pyx_INCREF(__pyx_t_2);
15906  __Pyx_INCREF(function);
15907  __Pyx_DECREF_SET(__pyx_t_14, function);
15908  __pyx_t_13 = 1;
15909  }
15910  }
15911  #if CYTHON_FAST_PYCALL
15912  if (PyFunction_Check(__pyx_t_14)) {
15913  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
15914  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15915  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15916  __Pyx_GOTREF(__pyx_t_6);
15917  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15918  } else
15919  #endif
15920  #if CYTHON_FAST_PYCCALL
15921  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
15922  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
15923  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15924  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15925  __Pyx_GOTREF(__pyx_t_6);
15926  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15927  } else
15928  #endif
15929  {
15930  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
15931  __Pyx_GOTREF(__pyx_t_7);
15932  if (__pyx_t_2) {
15933  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
15934  }
15935  __Pyx_GIVEREF(__pyx_t_8);
15936  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
15937  __Pyx_INCREF(__pyx_n_s_d);
15938  __Pyx_GIVEREF(__pyx_n_s_d);
15939  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
15940  __pyx_t_8 = 0;
15941  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 788, __pyx_L1_error)
15942  __Pyx_GOTREF(__pyx_t_6);
15943  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15944  }
15945  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15946  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 788, __pyx_L1_error)
15947  __Pyx_GOTREF(__pyx_t_14);
15948  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_tuple__28, __pyx_t_6) < 0)) __PYX_ERR(0, 788, __pyx_L1_error)
15949  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15950  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15951 
15952  /* "ADR.pyx":789
15953  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15954  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15955  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
15956  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15957  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15958  */
15959  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 789, __pyx_L1_error)
15960  __Pyx_GOTREF(__pyx_t_14);
15961  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
15962  __Pyx_GOTREF(__pyx_t_7);
15963  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15964  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 789, __pyx_L1_error)
15965  __Pyx_GOTREF(__pyx_t_14);
15966  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
15967  __Pyx_GOTREF(__pyx_t_8);
15968  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
15969  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 789, __pyx_L1_error)
15970  __Pyx_GOTREF(__pyx_t_14);
15971  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
15972  __Pyx_GOTREF(__pyx_t_2);
15973  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
15974  __Pyx_GOTREF(__pyx_t_1);
15975  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15976  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_tuple__29); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
15977  __Pyx_GOTREF(__pyx_t_2);
15978  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15979  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
15980  __Pyx_GOTREF(__pyx_t_1);
15981  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15982  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error)
15983  __Pyx_GOTREF(__pyx_t_2);
15984  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15985  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
15986  __Pyx_GOTREF(__pyx_t_1);
15987  __Pyx_GIVEREF(__pyx_t_8);
15988  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
15989  __Pyx_GIVEREF(__pyx_t_14);
15990  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_14);
15991  __Pyx_GIVEREF(__pyx_t_2);
15992  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
15993  __pyx_t_8 = 0;
15994  __pyx_t_14 = 0;
15995  __pyx_t_2 = 0;
15996  __pyx_t_2 = NULL;
15997  __pyx_t_13 = 0;
15998  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15999  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
16000  if (likely(__pyx_t_2)) {
16001  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16002  __Pyx_INCREF(__pyx_t_2);
16003  __Pyx_INCREF(function);
16004  __Pyx_DECREF_SET(__pyx_t_7, function);
16005  __pyx_t_13 = 1;
16006  }
16007  }
16008  #if CYTHON_FAST_PYCALL
16009  if (PyFunction_Check(__pyx_t_7)) {
16010  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_n_s_d};
16011  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16012  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16013  __Pyx_GOTREF(__pyx_t_6);
16014  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16015  } else
16016  #endif
16017  #if CYTHON_FAST_PYCCALL
16018  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16019  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_n_s_d};
16020  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16021  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16022  __Pyx_GOTREF(__pyx_t_6);
16023  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16024  } else
16025  #endif
16026  {
16027  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 789, __pyx_L1_error)
16028  __Pyx_GOTREF(__pyx_t_14);
16029  if (__pyx_t_2) {
16030  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
16031  }
16032  __Pyx_GIVEREF(__pyx_t_1);
16033  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_1);
16034  __Pyx_INCREF(__pyx_n_s_d);
16035  __Pyx_GIVEREF(__pyx_n_s_d);
16036  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_n_s_d);
16037  __pyx_t_1 = 0;
16038  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
16039  __Pyx_GOTREF(__pyx_t_6);
16040  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16041  }
16042  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16043  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
16044  __Pyx_GOTREF(__pyx_t_7);
16045  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__30, __pyx_t_6) < 0)) __PYX_ERR(0, 789, __pyx_L1_error)
16046  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16047  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16048 
16049  /* "ADR.pyx":790
16050  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16051  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16052  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16053  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16054  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16055  */
16056  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
16057  __Pyx_GOTREF(__pyx_t_7);
16058  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 790, __pyx_L1_error)
16059  __Pyx_GOTREF(__pyx_t_14);
16060  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16061  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
16062  __Pyx_GOTREF(__pyx_t_7);
16063  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
16064  __Pyx_GOTREF(__pyx_t_1);
16065  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16066  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
16067  __Pyx_GOTREF(__pyx_t_7);
16068  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
16069  __Pyx_GOTREF(__pyx_t_2);
16070  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L1_error)
16071  __Pyx_GOTREF(__pyx_t_8);
16072  __Pyx_GIVEREF(__pyx_t_1);
16073  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
16074  __Pyx_GIVEREF(__pyx_t_7);
16075  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
16076  __Pyx_GIVEREF(__pyx_t_2);
16077  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_2);
16078  __pyx_t_1 = 0;
16079  __pyx_t_7 = 0;
16080  __pyx_t_2 = 0;
16081  __pyx_t_2 = NULL;
16082  __pyx_t_13 = 0;
16083  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
16084  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
16085  if (likely(__pyx_t_2)) {
16086  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
16087  __Pyx_INCREF(__pyx_t_2);
16088  __Pyx_INCREF(function);
16089  __Pyx_DECREF_SET(__pyx_t_14, function);
16090  __pyx_t_13 = 1;
16091  }
16092  }
16093  #if CYTHON_FAST_PYCALL
16094  if (PyFunction_Check(__pyx_t_14)) {
16095  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
16096  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16097  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16098  __Pyx_GOTREF(__pyx_t_6);
16099  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16100  } else
16101  #endif
16102  #if CYTHON_FAST_PYCCALL
16103  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
16104  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
16105  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16106  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16107  __Pyx_GOTREF(__pyx_t_6);
16108  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16109  } else
16110  #endif
16111  {
16112  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
16113  __Pyx_GOTREF(__pyx_t_7);
16114  if (__pyx_t_2) {
16115  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
16116  }
16117  __Pyx_GIVEREF(__pyx_t_8);
16118  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
16119  __Pyx_INCREF(__pyx_n_s_d);
16120  __Pyx_GIVEREF(__pyx_n_s_d);
16121  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
16122  __pyx_t_8 = 0;
16123  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
16124  __Pyx_GOTREF(__pyx_t_6);
16125  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16126  }
16127  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16128  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 790, __pyx_L1_error)
16129  __Pyx_GOTREF(__pyx_t_14);
16130  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_tuple__31, __pyx_t_6) < 0)) __PYX_ERR(0, 790, __pyx_L1_error)
16131  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16132  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16133 
16134  /* "ADR.pyx":791
16135  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16136  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16137  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16138  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16139  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16140  */
16141  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 791, __pyx_L1_error)
16142  __Pyx_GOTREF(__pyx_t_14);
16143  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
16144  __Pyx_GOTREF(__pyx_t_7);
16145  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16146  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 791, __pyx_L1_error)
16147  __Pyx_GOTREF(__pyx_t_14);
16148  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 791, __pyx_L1_error)
16149  __Pyx_GOTREF(__pyx_t_8);
16150  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16151  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 791, __pyx_L1_error)
16152  __Pyx_GOTREF(__pyx_t_14);
16153  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
16154  __Pyx_GOTREF(__pyx_t_2);
16155  __Pyx_GIVEREF(__pyx_t_8);
16156  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
16157  __Pyx_GIVEREF(__pyx_t_14);
16158  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
16159  __pyx_t_8 = 0;
16160  __pyx_t_14 = 0;
16161  __pyx_t_14 = NULL;
16162  __pyx_t_13 = 0;
16163  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16164  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
16165  if (likely(__pyx_t_14)) {
16166  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16167  __Pyx_INCREF(__pyx_t_14);
16168  __Pyx_INCREF(function);
16169  __Pyx_DECREF_SET(__pyx_t_7, function);
16170  __pyx_t_13 = 1;
16171  }
16172  }
16173  #if CYTHON_FAST_PYCALL
16174  if (PyFunction_Check(__pyx_t_7)) {
16175  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16176  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16177  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16178  __Pyx_GOTREF(__pyx_t_6);
16179  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16180  } else
16181  #endif
16182  #if CYTHON_FAST_PYCCALL
16183  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16184  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16185  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16186  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16187  __Pyx_GOTREF(__pyx_t_6);
16188  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16189  } else
16190  #endif
16191  {
16192  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 791, __pyx_L1_error)
16193  __Pyx_GOTREF(__pyx_t_8);
16194  if (__pyx_t_14) {
16195  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
16196  }
16197  __Pyx_GIVEREF(__pyx_t_2);
16198  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_2);
16199  __Pyx_INCREF(__pyx_n_s_d);
16200  __Pyx_GIVEREF(__pyx_n_s_d);
16201  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_d);
16202  __pyx_t_2 = 0;
16203  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
16204  __Pyx_GOTREF(__pyx_t_6);
16205  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16206  }
16207  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16208  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
16209  __Pyx_GOTREF(__pyx_t_7);
16210  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__32, __pyx_t_6) < 0)) __PYX_ERR(0, 791, __pyx_L1_error)
16211  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16212  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16213 
16214  /* "ADR.pyx":792
16215  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
16216  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16217  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16218  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16219  *
16220  */
16221  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
16222  __Pyx_GOTREF(__pyx_t_7);
16223  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 792, __pyx_L1_error)
16224  __Pyx_GOTREF(__pyx_t_8);
16225  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16226  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
16227  __Pyx_GOTREF(__pyx_t_7);
16228  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
16229  __Pyx_GOTREF(__pyx_t_2);
16230  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16231  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error)
16232  __Pyx_GOTREF(__pyx_t_7);
16233  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 792, __pyx_L1_error)
16234  __Pyx_GOTREF(__pyx_t_14);
16235  __Pyx_GIVEREF(__pyx_t_2);
16236  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2);
16237  __Pyx_GIVEREF(__pyx_t_7);
16238  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_7);
16239  __pyx_t_2 = 0;
16240  __pyx_t_7 = 0;
16241  __pyx_t_7 = NULL;
16242  __pyx_t_13 = 0;
16243  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
16244  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
16245  if (likely(__pyx_t_7)) {
16246  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
16247  __Pyx_INCREF(__pyx_t_7);
16248  __Pyx_INCREF(function);
16249  __Pyx_DECREF_SET(__pyx_t_8, function);
16250  __pyx_t_13 = 1;
16251  }
16252  }
16253  #if CYTHON_FAST_PYCALL
16254  if (PyFunction_Check(__pyx_t_8)) {
16255  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_n_s_d};
16256  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16257  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16258  __Pyx_GOTREF(__pyx_t_6);
16259  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16260  } else
16261  #endif
16262  #if CYTHON_FAST_PYCCALL
16263  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
16264  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_n_s_d};
16265  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16266  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16267  __Pyx_GOTREF(__pyx_t_6);
16268  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16269  } else
16270  #endif
16271  {
16272  __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
16273  __Pyx_GOTREF(__pyx_t_2);
16274  if (__pyx_t_7) {
16275  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
16276  }
16277  __Pyx_GIVEREF(__pyx_t_14);
16278  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_14);
16279  __Pyx_INCREF(__pyx_n_s_d);
16280  __Pyx_GIVEREF(__pyx_n_s_d);
16281  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_n_s_d);
16282  __pyx_t_14 = 0;
16283  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
16284  __Pyx_GOTREF(__pyx_t_6);
16285  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16286  }
16287  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16288  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 792, __pyx_L1_error)
16289  __Pyx_GOTREF(__pyx_t_8);
16290  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__33, __pyx_t_6) < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
16291  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16292  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16293 
16294  /* "ADR.pyx":793
16295  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16296  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16297  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16298  *
16299  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16300  */
16301  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
16302  __Pyx_GOTREF(__pyx_t_8);
16303  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
16304  __Pyx_GOTREF(__pyx_t_2);
16305  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16306  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
16307  __Pyx_GOTREF(__pyx_t_8);
16308  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 793, __pyx_L1_error)
16309  __Pyx_GOTREF(__pyx_t_14);
16310  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16311  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error)
16312  __Pyx_GOTREF(__pyx_t_8);
16313  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error)
16314  __Pyx_GOTREF(__pyx_t_7);
16315  __Pyx_GIVEREF(__pyx_t_14);
16316  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
16317  __Pyx_GIVEREF(__pyx_t_8);
16318  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
16319  __pyx_t_14 = 0;
16320  __pyx_t_8 = 0;
16321  __pyx_t_8 = NULL;
16322  __pyx_t_13 = 0;
16323  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16324  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
16325  if (likely(__pyx_t_8)) {
16326  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16327  __Pyx_INCREF(__pyx_t_8);
16328  __Pyx_INCREF(function);
16329  __Pyx_DECREF_SET(__pyx_t_2, function);
16330  __pyx_t_13 = 1;
16331  }
16332  }
16333  #if CYTHON_FAST_PYCALL
16334  if (PyFunction_Check(__pyx_t_2)) {
16335  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_n_s_d};
16336  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16337  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16338  __Pyx_GOTREF(__pyx_t_6);
16339  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16340  } else
16341  #endif
16342  #if CYTHON_FAST_PYCCALL
16343  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16344  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_n_s_d};
16345  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16346  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16347  __Pyx_GOTREF(__pyx_t_6);
16348  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16349  } else
16350  #endif
16351  {
16352  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 793, __pyx_L1_error)
16353  __Pyx_GOTREF(__pyx_t_14);
16354  if (__pyx_t_8) {
16355  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
16356  }
16357  __Pyx_GIVEREF(__pyx_t_7);
16358  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_7);
16359  __Pyx_INCREF(__pyx_n_s_d);
16360  __Pyx_GIVEREF(__pyx_n_s_d);
16361  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_n_s_d);
16362  __pyx_t_7 = 0;
16363  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
16364  __Pyx_GOTREF(__pyx_t_6);
16365  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16366  }
16367  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16368  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
16369  __Pyx_GOTREF(__pyx_t_2);
16370  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__34, __pyx_t_6) < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
16371  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16372  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16373 
16374  /* "ADR.pyx":795
16375  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16376  *
16377  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16378  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16379  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16380  */
16381  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
16382  __Pyx_GOTREF(__pyx_t_2);
16383  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 795, __pyx_L1_error)
16384  __Pyx_GOTREF(__pyx_t_14);
16385  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16386  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
16387  __Pyx_GOTREF(__pyx_t_2);
16388  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
16389  __Pyx_GOTREF(__pyx_t_7);
16390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16391  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error)
16392  __Pyx_GOTREF(__pyx_t_2);
16393  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 795, __pyx_L1_error)
16394  __Pyx_GOTREF(__pyx_t_8);
16395  __Pyx_GIVEREF(__pyx_t_7);
16396  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
16397  __Pyx_GIVEREF(__pyx_t_2);
16398  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
16399  __pyx_t_7 = 0;
16400  __pyx_t_2 = 0;
16401  __pyx_t_2 = NULL;
16402  __pyx_t_13 = 0;
16403  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
16404  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
16405  if (likely(__pyx_t_2)) {
16406  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
16407  __Pyx_INCREF(__pyx_t_2);
16408  __Pyx_INCREF(function);
16409  __Pyx_DECREF_SET(__pyx_t_14, function);
16410  __pyx_t_13 = 1;
16411  }
16412  }
16413  #if CYTHON_FAST_PYCALL
16414  if (PyFunction_Check(__pyx_t_14)) {
16415  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
16416  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16417  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16418  __Pyx_GOTREF(__pyx_t_6);
16419  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16420  } else
16421  #endif
16422  #if CYTHON_FAST_PYCCALL
16423  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
16424  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
16425  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16426  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16427  __Pyx_GOTREF(__pyx_t_6);
16428  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16429  } else
16430  #endif
16431  {
16432  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
16433  __Pyx_GOTREF(__pyx_t_7);
16434  if (__pyx_t_2) {
16435  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
16436  }
16437  __Pyx_GIVEREF(__pyx_t_8);
16438  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
16439  __Pyx_INCREF(__pyx_n_s_d);
16440  __Pyx_GIVEREF(__pyx_n_s_d);
16441  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
16442  __pyx_t_8 = 0;
16443  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
16444  __Pyx_GOTREF(__pyx_t_6);
16445  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16446  }
16447  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16448  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 795, __pyx_L1_error)
16449  __Pyx_GOTREF(__pyx_t_14);
16450  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_n_s_penalty, __pyx_t_6) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
16451  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16452  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16453 
16454  /* "ADR.pyx":796
16455  *
16456  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16457  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16458  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16459  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16460  */
16461  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 796, __pyx_L1_error)
16462  __Pyx_GOTREF(__pyx_t_14);
16463  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
16464  __Pyx_GOTREF(__pyx_t_7);
16465  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16466  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 796, __pyx_L1_error)
16467  __Pyx_GOTREF(__pyx_t_14);
16468  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L1_error)
16469  __Pyx_GOTREF(__pyx_t_8);
16470  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16471  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 796, __pyx_L1_error)
16472  __Pyx_GOTREF(__pyx_t_14);
16473  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
16474  __Pyx_GOTREF(__pyx_t_2);
16475  __Pyx_GIVEREF(__pyx_t_8);
16476  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
16477  __Pyx_GIVEREF(__pyx_t_14);
16478  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
16479  __pyx_t_8 = 0;
16480  __pyx_t_14 = 0;
16481  __pyx_t_14 = NULL;
16482  __pyx_t_13 = 0;
16483  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16484  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
16485  if (likely(__pyx_t_14)) {
16486  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16487  __Pyx_INCREF(__pyx_t_14);
16488  __Pyx_INCREF(function);
16489  __Pyx_DECREF_SET(__pyx_t_7, function);
16490  __pyx_t_13 = 1;
16491  }
16492  }
16493  #if CYTHON_FAST_PYCALL
16494  if (PyFunction_Check(__pyx_t_7)) {
16495  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16496  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16497  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16498  __Pyx_GOTREF(__pyx_t_6);
16499  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16500  } else
16501  #endif
16502  #if CYTHON_FAST_PYCCALL
16503  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16504  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16505  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16506  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16507  __Pyx_GOTREF(__pyx_t_6);
16508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16509  } else
16510  #endif
16511  {
16512  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L1_error)
16513  __Pyx_GOTREF(__pyx_t_8);
16514  if (__pyx_t_14) {
16515  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
16516  }
16517  __Pyx_GIVEREF(__pyx_t_2);
16518  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_2);
16519  __Pyx_INCREF(__pyx_n_s_d);
16520  __Pyx_GIVEREF(__pyx_n_s_d);
16521  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_d);
16522  __pyx_t_2 = 0;
16523  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L1_error)
16524  __Pyx_GOTREF(__pyx_t_6);
16525  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16526  }
16527  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16528  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
16529  __Pyx_GOTREF(__pyx_t_7);
16530  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__35, __pyx_t_6) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
16531  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16532  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16533 
16534  /* "ADR.pyx":797
16535  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16536  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16537  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16538  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16539  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16540  */
16541  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
16542  __Pyx_GOTREF(__pyx_t_7);
16543  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
16544  __Pyx_GOTREF(__pyx_t_8);
16545  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16546  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
16547  __Pyx_GOTREF(__pyx_t_7);
16548  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
16549  __Pyx_GOTREF(__pyx_t_2);
16550  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16551  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error)
16552  __Pyx_GOTREF(__pyx_t_7);
16553  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 797, __pyx_L1_error)
16554  __Pyx_GOTREF(__pyx_t_14);
16555  __Pyx_GIVEREF(__pyx_t_2);
16556  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2);
16557  __Pyx_GIVEREF(__pyx_t_7);
16558  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_7);
16559  __pyx_t_2 = 0;
16560  __pyx_t_7 = 0;
16561  __pyx_t_7 = NULL;
16562  __pyx_t_13 = 0;
16563  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
16564  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
16565  if (likely(__pyx_t_7)) {
16566  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
16567  __Pyx_INCREF(__pyx_t_7);
16568  __Pyx_INCREF(function);
16569  __Pyx_DECREF_SET(__pyx_t_8, function);
16570  __pyx_t_13 = 1;
16571  }
16572  }
16573  #if CYTHON_FAST_PYCALL
16574  if (PyFunction_Check(__pyx_t_8)) {
16575  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_n_s_i};
16576  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16577  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16578  __Pyx_GOTREF(__pyx_t_6);
16579  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16580  } else
16581  #endif
16582  #if CYTHON_FAST_PYCCALL
16583  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
16584  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_14, __pyx_n_s_i};
16585  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16586  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16587  __Pyx_GOTREF(__pyx_t_6);
16588  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16589  } else
16590  #endif
16591  {
16592  __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
16593  __Pyx_GOTREF(__pyx_t_2);
16594  if (__pyx_t_7) {
16595  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
16596  }
16597  __Pyx_GIVEREF(__pyx_t_14);
16598  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_14);
16599  __Pyx_INCREF(__pyx_n_s_i);
16600  __Pyx_GIVEREF(__pyx_n_s_i);
16601  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_n_s_i);
16602  __pyx_t_14 = 0;
16603  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
16604  __Pyx_GOTREF(__pyx_t_6);
16605  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16606  }
16607  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16608  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error)
16609  __Pyx_GOTREF(__pyx_t_8);
16610  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__36, __pyx_t_6) < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
16611  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16612  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16613 
16614  /* "ADR.pyx":798
16615  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16616  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16617  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16618  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16619  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16620  */
16621  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
16622  __Pyx_GOTREF(__pyx_t_8);
16623  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
16624  __Pyx_GOTREF(__pyx_t_2);
16625  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16626  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
16627  __Pyx_GOTREF(__pyx_t_8);
16628  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 798, __pyx_L1_error)
16629  __Pyx_GOTREF(__pyx_t_14);
16630  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16631  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
16632  __Pyx_GOTREF(__pyx_t_8);
16633  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 798, __pyx_L1_error)
16634  __Pyx_GOTREF(__pyx_t_7);
16635  __Pyx_GIVEREF(__pyx_t_14);
16636  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
16637  __Pyx_GIVEREF(__pyx_t_8);
16638  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
16639  __pyx_t_14 = 0;
16640  __pyx_t_8 = 0;
16641  __pyx_t_8 = NULL;
16642  __pyx_t_13 = 0;
16643  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16644  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
16645  if (likely(__pyx_t_8)) {
16646  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16647  __Pyx_INCREF(__pyx_t_8);
16648  __Pyx_INCREF(function);
16649  __Pyx_DECREF_SET(__pyx_t_2, function);
16650  __pyx_t_13 = 1;
16651  }
16652  }
16653  #if CYTHON_FAST_PYCALL
16654  if (PyFunction_Check(__pyx_t_2)) {
16655  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_n_s_d};
16656  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16657  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16658  __Pyx_GOTREF(__pyx_t_6);
16659  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16660  } else
16661  #endif
16662  #if CYTHON_FAST_PYCCALL
16663  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
16664  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_n_s_d};
16665  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16666  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16667  __Pyx_GOTREF(__pyx_t_6);
16668  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16669  } else
16670  #endif
16671  {
16672  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 798, __pyx_L1_error)
16673  __Pyx_GOTREF(__pyx_t_14);
16674  if (__pyx_t_8) {
16675  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
16676  }
16677  __Pyx_GIVEREF(__pyx_t_7);
16678  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_7);
16679  __Pyx_INCREF(__pyx_n_s_d);
16680  __Pyx_GIVEREF(__pyx_n_s_d);
16681  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_n_s_d);
16682  __pyx_t_7 = 0;
16683  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
16684  __Pyx_GOTREF(__pyx_t_6);
16685  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16686  }
16687  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16688  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
16689  __Pyx_GOTREF(__pyx_t_2);
16690  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_tuple__37, __pyx_t_6) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
16691  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16692  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16693 
16694  /* "ADR.pyx":799
16695  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16696  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16697  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16698  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16699  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16700  */
16701  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
16702  __Pyx_GOTREF(__pyx_t_2);
16703  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 799, __pyx_L1_error)
16704  __Pyx_GOTREF(__pyx_t_14);
16705  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16706  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
16707  __Pyx_GOTREF(__pyx_t_2);
16708  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
16709  __Pyx_GOTREF(__pyx_t_7);
16710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16711  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
16712  __Pyx_GOTREF(__pyx_t_2);
16713  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 799, __pyx_L1_error)
16714  __Pyx_GOTREF(__pyx_t_8);
16715  __Pyx_GIVEREF(__pyx_t_7);
16716  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
16717  __Pyx_GIVEREF(__pyx_t_2);
16718  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
16719  __pyx_t_7 = 0;
16720  __pyx_t_2 = 0;
16721  __pyx_t_2 = NULL;
16722  __pyx_t_13 = 0;
16723  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
16724  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
16725  if (likely(__pyx_t_2)) {
16726  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
16727  __Pyx_INCREF(__pyx_t_2);
16728  __Pyx_INCREF(function);
16729  __Pyx_DECREF_SET(__pyx_t_14, function);
16730  __pyx_t_13 = 1;
16731  }
16732  }
16733  #if CYTHON_FAST_PYCALL
16734  if (PyFunction_Check(__pyx_t_14)) {
16735  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_i};
16736  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16737  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16738  __Pyx_GOTREF(__pyx_t_6);
16739  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16740  } else
16741  #endif
16742  #if CYTHON_FAST_PYCCALL
16743  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
16744  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_i};
16745  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16746  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16747  __Pyx_GOTREF(__pyx_t_6);
16748  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16749  } else
16750  #endif
16751  {
16752  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
16753  __Pyx_GOTREF(__pyx_t_7);
16754  if (__pyx_t_2) {
16755  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
16756  }
16757  __Pyx_GIVEREF(__pyx_t_8);
16758  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
16759  __Pyx_INCREF(__pyx_n_s_i);
16760  __Pyx_GIVEREF(__pyx_n_s_i);
16761  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_i);
16762  __pyx_t_8 = 0;
16763  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
16764  __Pyx_GOTREF(__pyx_t_6);
16765  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16766  }
16767  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16768  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 799, __pyx_L1_error)
16769  __Pyx_GOTREF(__pyx_t_14);
16770  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_tuple__38, __pyx_t_6) < 0)) __PYX_ERR(0, 799, __pyx_L1_error)
16771  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16772  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16773 
16774  /* "ADR.pyx":800
16775  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16776  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16777  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16778  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16779  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16780  */
16781  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 800, __pyx_L1_error)
16782  __Pyx_GOTREF(__pyx_t_14);
16783  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error)
16784  __Pyx_GOTREF(__pyx_t_7);
16785  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16786  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 800, __pyx_L1_error)
16787  __Pyx_GOTREF(__pyx_t_14);
16788  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
16789  __Pyx_GOTREF(__pyx_t_8);
16790  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16791  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 800, __pyx_L1_error)
16792  __Pyx_GOTREF(__pyx_t_14);
16793  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
16794  __Pyx_GOTREF(__pyx_t_2);
16795  __Pyx_GIVEREF(__pyx_t_8);
16796  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
16797  __Pyx_GIVEREF(__pyx_t_14);
16798  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
16799  __pyx_t_8 = 0;
16800  __pyx_t_14 = 0;
16801  __pyx_t_14 = NULL;
16802  __pyx_t_13 = 0;
16803  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16804  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
16805  if (likely(__pyx_t_14)) {
16806  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16807  __Pyx_INCREF(__pyx_t_14);
16808  __Pyx_INCREF(function);
16809  __Pyx_DECREF_SET(__pyx_t_7, function);
16810  __pyx_t_13 = 1;
16811  }
16812  }
16813  #if CYTHON_FAST_PYCALL
16814  if (PyFunction_Check(__pyx_t_7)) {
16815  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16816  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16817  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16818  __Pyx_GOTREF(__pyx_t_6);
16819  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16820  } else
16821  #endif
16822  #if CYTHON_FAST_PYCCALL
16823  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16824  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16825  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16826  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16827  __Pyx_GOTREF(__pyx_t_6);
16828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16829  } else
16830  #endif
16831  {
16832  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 800, __pyx_L1_error)
16833  __Pyx_GOTREF(__pyx_t_8);
16834  if (__pyx_t_14) {
16835  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
16836  }
16837  __Pyx_GIVEREF(__pyx_t_2);
16838  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_2);
16839  __Pyx_INCREF(__pyx_n_s_d);
16840  __Pyx_GIVEREF(__pyx_n_s_d);
16841  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_d);
16842  __pyx_t_2 = 0;
16843  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error)
16844  __Pyx_GOTREF(__pyx_t_6);
16845  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16846  }
16847  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16848  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error)
16849  __Pyx_GOTREF(__pyx_t_7);
16850  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__39, __pyx_t_6) < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
16851  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16852  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16853 
16854  /* "ADR.pyx":801
16855  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16856  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16857  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16858  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16859  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16860  */
16861  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
16862  __Pyx_GOTREF(__pyx_t_7);
16863  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 801, __pyx_L1_error)
16864  __Pyx_GOTREF(__pyx_t_8);
16865  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16866  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
16867  __Pyx_GOTREF(__pyx_t_7);
16868  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
16869  __Pyx_GOTREF(__pyx_t_2);
16870  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16871  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
16872  __Pyx_GOTREF(__pyx_t_7);
16873  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 801, __pyx_L1_error)
16874  __Pyx_GOTREF(__pyx_t_14);
16875  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
16876  __Pyx_GOTREF(__pyx_t_1);
16877  __Pyx_GIVEREF(__pyx_t_2);
16878  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
16879  __Pyx_GIVEREF(__pyx_t_7);
16880  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
16881  __Pyx_GIVEREF(__pyx_t_14);
16882  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_14);
16883  __pyx_t_2 = 0;
16884  __pyx_t_7 = 0;
16885  __pyx_t_14 = 0;
16886  __pyx_t_14 = NULL;
16887  __pyx_t_13 = 0;
16888  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
16889  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
16890  if (likely(__pyx_t_14)) {
16891  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
16892  __Pyx_INCREF(__pyx_t_14);
16893  __Pyx_INCREF(function);
16894  __Pyx_DECREF_SET(__pyx_t_8, function);
16895  __pyx_t_13 = 1;
16896  }
16897  }
16898  #if CYTHON_FAST_PYCALL
16899  if (PyFunction_Check(__pyx_t_8)) {
16900  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_1, __pyx_n_s_d};
16901  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16902  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16903  __Pyx_GOTREF(__pyx_t_6);
16904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16905  } else
16906  #endif
16907  #if CYTHON_FAST_PYCCALL
16908  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
16909  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_1, __pyx_n_s_d};
16910  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16911  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
16912  __Pyx_GOTREF(__pyx_t_6);
16913  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16914  } else
16915  #endif
16916  {
16917  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
16918  __Pyx_GOTREF(__pyx_t_7);
16919  if (__pyx_t_14) {
16920  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); __pyx_t_14 = NULL;
16921  }
16922  __Pyx_GIVEREF(__pyx_t_1);
16923  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_1);
16924  __Pyx_INCREF(__pyx_n_s_d);
16925  __Pyx_GIVEREF(__pyx_n_s_d);
16926  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
16927  __pyx_t_1 = 0;
16928  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
16929  __Pyx_GOTREF(__pyx_t_6);
16930  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16931  }
16932  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16933  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 801, __pyx_L1_error)
16934  __Pyx_GOTREF(__pyx_t_8);
16935  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__40, __pyx_t_6) < 0)) __PYX_ERR(0, 801, __pyx_L1_error)
16936  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16937  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16938 
16939  /* "ADR.pyx":802
16940  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16941  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16942  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
16943  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16944  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16945  */
16946  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
16947  __Pyx_GOTREF(__pyx_t_8);
16948  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error)
16949  __Pyx_GOTREF(__pyx_t_7);
16950  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16951  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
16952  __Pyx_GOTREF(__pyx_t_8);
16953  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
16954  __Pyx_GOTREF(__pyx_t_1);
16955  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16956  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
16957  __Pyx_GOTREF(__pyx_t_8);
16958  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 802, __pyx_L1_error)
16959  __Pyx_GOTREF(__pyx_t_14);
16960  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
16961  __Pyx_GOTREF(__pyx_t_2);
16962  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16963  __pyx_t_14 = PyObject_GetItem(__pyx_t_2, __pyx_tuple__41); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 802, __pyx_L1_error)
16964  __Pyx_GOTREF(__pyx_t_14);
16965  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16966  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_14, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
16967  __Pyx_GOTREF(__pyx_t_2);
16968  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
16969  __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 802, __pyx_L1_error)
16970  __Pyx_GOTREF(__pyx_t_14);
16971  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16972  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
16973  __Pyx_GOTREF(__pyx_t_2);
16974  __Pyx_GIVEREF(__pyx_t_1);
16975  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
16976  __Pyx_GIVEREF(__pyx_t_8);
16977  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
16978  __Pyx_GIVEREF(__pyx_t_14);
16979  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_14);
16980  __pyx_t_1 = 0;
16981  __pyx_t_8 = 0;
16982  __pyx_t_14 = 0;
16983  __pyx_t_14 = NULL;
16984  __pyx_t_13 = 0;
16985  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16986  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
16987  if (likely(__pyx_t_14)) {
16988  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16989  __Pyx_INCREF(__pyx_t_14);
16990  __Pyx_INCREF(function);
16991  __Pyx_DECREF_SET(__pyx_t_7, function);
16992  __pyx_t_13 = 1;
16993  }
16994  }
16995  #if CYTHON_FAST_PYCALL
16996  if (PyFunction_Check(__pyx_t_7)) {
16997  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
16998  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
16999  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
17000  __Pyx_GOTREF(__pyx_t_6);
17001  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17002  } else
17003  #endif
17004  #if CYTHON_FAST_PYCCALL
17005  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
17006  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_n_s_d};
17007  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
17008  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
17009  __Pyx_GOTREF(__pyx_t_6);
17010  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17011  } else
17012  #endif
17013  {
17014  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
17015  __Pyx_GOTREF(__pyx_t_8);
17016  if (__pyx_t_14) {
17017  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
17018  }
17019  __Pyx_GIVEREF(__pyx_t_2);
17020  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_2);
17021  __Pyx_INCREF(__pyx_n_s_d);
17022  __Pyx_GIVEREF(__pyx_n_s_d);
17023  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_d);
17024  __pyx_t_2 = 0;
17025  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
17026  __Pyx_GOTREF(__pyx_t_6);
17027  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17028  }
17029  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17030  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 802, __pyx_L1_error)
17031  __Pyx_GOTREF(__pyx_t_7);
17032  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__42, __pyx_t_6) < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
17033  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17034  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17035 
17036  /* "ADR.pyx":803
17037  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
17038  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
17039  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
17040  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17041  *
17042  */
17043  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
17044  __Pyx_GOTREF(__pyx_t_7);
17045  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
17046  __Pyx_GOTREF(__pyx_t_8);
17047  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17048  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
17049  __Pyx_GOTREF(__pyx_t_7);
17050  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
17051  __Pyx_GOTREF(__pyx_t_2);
17052  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17053  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
17054  __Pyx_GOTREF(__pyx_t_7);
17055  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 803, __pyx_L1_error)
17056  __Pyx_GOTREF(__pyx_t_14);
17057  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
17058  __Pyx_GOTREF(__pyx_t_1);
17059  __Pyx_GIVEREF(__pyx_t_2);
17060  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17061  __Pyx_GIVEREF(__pyx_t_7);
17062  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
17063  __Pyx_GIVEREF(__pyx_t_14);
17064  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_14);
17065  __pyx_t_2 = 0;
17066  __pyx_t_7 = 0;
17067  __pyx_t_14 = 0;
17068  __pyx_t_14 = NULL;
17069  __pyx_t_13 = 0;
17070  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
17071  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
17072  if (likely(__pyx_t_14)) {
17073  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
17074  __Pyx_INCREF(__pyx_t_14);
17075  __Pyx_INCREF(function);
17076  __Pyx_DECREF_SET(__pyx_t_8, function);
17077  __pyx_t_13 = 1;
17078  }
17079  }
17080  #if CYTHON_FAST_PYCALL
17081  if (PyFunction_Check(__pyx_t_8)) {
17082  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_1, __pyx_n_s_d};
17083  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17084  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
17085  __Pyx_GOTREF(__pyx_t_6);
17086  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17087  } else
17088  #endif
17089  #if CYTHON_FAST_PYCCALL
17090  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
17091  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_1, __pyx_n_s_d};
17092  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17093  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
17094  __Pyx_GOTREF(__pyx_t_6);
17095  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17096  } else
17097  #endif
17098  {
17099  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
17100  __Pyx_GOTREF(__pyx_t_7);
17101  if (__pyx_t_14) {
17102  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); __pyx_t_14 = NULL;
17103  }
17104  __Pyx_GIVEREF(__pyx_t_1);
17105  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_1);
17106  __Pyx_INCREF(__pyx_n_s_d);
17107  __Pyx_GIVEREF(__pyx_n_s_d);
17108  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_n_s_d);
17109  __pyx_t_1 = 0;
17110  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17111  __Pyx_GOTREF(__pyx_t_6);
17112  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17113  }
17114  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17115  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
17116  __Pyx_GOTREF(__pyx_t_8);
17117  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__43, __pyx_t_6) < 0)) __PYX_ERR(0, 803, __pyx_L1_error)
17118  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17119  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17120 
17121  /* "ADR.pyx":804
17122  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
17123  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
17124  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
17125  *
17126  * self.points_elementBoundaryQuadrature= set()
17127  */
17128  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
17129  __Pyx_GOTREF(__pyx_t_8);
17130  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error)
17131  __Pyx_GOTREF(__pyx_t_7);
17132  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17133  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
17134  __Pyx_GOTREF(__pyx_t_8);
17135  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
17136  __Pyx_GOTREF(__pyx_t_1);
17137  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17138  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __pyx_L1_error)
17139  __Pyx_GOTREF(__pyx_t_8);
17140  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 804, __pyx_L1_error)
17141  __Pyx_GOTREF(__pyx_t_14);
17142  __Pyx_GIVEREF(__pyx_t_1);
17143  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1);
17144  __Pyx_GIVEREF(__pyx_t_8);
17145  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_8);
17146  __pyx_t_1 = 0;
17147  __pyx_t_8 = 0;
17148  __pyx_t_8 = NULL;
17149  __pyx_t_13 = 0;
17150  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17151  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
17152  if (likely(__pyx_t_8)) {
17153  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17154  __Pyx_INCREF(__pyx_t_8);
17155  __Pyx_INCREF(function);
17156  __Pyx_DECREF_SET(__pyx_t_7, function);
17157  __pyx_t_13 = 1;
17158  }
17159  }
17160  #if CYTHON_FAST_PYCALL
17161  if (PyFunction_Check(__pyx_t_7)) {
17162  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_14, __pyx_n_s_d};
17163  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17164  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17165  __Pyx_GOTREF(__pyx_t_6);
17166  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17167  } else
17168  #endif
17169  #if CYTHON_FAST_PYCCALL
17170  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
17171  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_14, __pyx_n_s_d};
17172  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17173  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17174  __Pyx_GOTREF(__pyx_t_6);
17175  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17176  } else
17177  #endif
17178  {
17179  __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
17180  __Pyx_GOTREF(__pyx_t_1);
17181  if (__pyx_t_8) {
17182  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
17183  }
17184  __Pyx_GIVEREF(__pyx_t_14);
17185  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_14);
17186  __Pyx_INCREF(__pyx_n_s_d);
17187  __Pyx_GIVEREF(__pyx_n_s_d);
17188  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_n_s_d);
17189  __pyx_t_14 = 0;
17190  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
17191  __Pyx_GOTREF(__pyx_t_6);
17192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17193  }
17194  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17195  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error)
17196  __Pyx_GOTREF(__pyx_t_7);
17197  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__44, __pyx_t_6) < 0)) __PYX_ERR(0, 804, __pyx_L1_error)
17198  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17199  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17200 
17201  /* "ADR.pyx":806
17202  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17203  *
17204  * self.points_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17205  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17206  * self.vectors_elementBoundaryQuadrature= set()
17207  */
17208  __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
17209  __Pyx_GOTREF(__pyx_t_6);
17210  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points_elementBoundaryQuadrature, __pyx_t_6) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
17211  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17212 
17213  /* "ADR.pyx":807
17214  *
17215  * self.points_elementBoundaryQuadrature= set()
17216  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)]) # <<<<<<<<<<<<<<
17217  * self.vectors_elementBoundaryQuadrature= set()
17218  * self.tensors_elementBoundaryQuadrature= set()
17219  */
17220  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error)
17221  __Pyx_GOTREF(__pyx_t_6);
17222  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error)
17223  __Pyx_GOTREF(__pyx_t_7);
17224  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
17225  __Pyx_GOTREF(__pyx_t_1);
17226  __Pyx_GIVEREF(__pyx_t_7);
17227  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
17228  __pyx_t_7 = 0;
17229  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error)
17230  __Pyx_GOTREF(__pyx_t_7);
17231  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17232  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
17233  __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
17234  __pyx_t_5 = NULL;
17235  } else {
17236  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
17237  __Pyx_GOTREF(__pyx_t_1);
17238  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error)
17239  }
17240  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17241  for (;;) {
17242  if (likely(!__pyx_t_5)) {
17243  if (likely(PyList_CheckExact(__pyx_t_1))) {
17244  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
17245  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17246  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
17247  #else
17248  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error)
17249  __Pyx_GOTREF(__pyx_t_7);
17250  #endif
17251  } else {
17252  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
17253  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17254  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
17255  #else
17256  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error)
17257  __Pyx_GOTREF(__pyx_t_7);
17258  #endif
17259  }
17260  } else {
17261  __pyx_t_7 = __pyx_t_5(__pyx_t_1);
17262  if (unlikely(!__pyx_t_7)) {
17263  PyObject* exc_type = PyErr_Occurred();
17264  if (exc_type) {
17265  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17266  else __PYX_ERR(0, 807, __pyx_L1_error)
17267  }
17268  break;
17269  }
17270  __Pyx_GOTREF(__pyx_t_7);
17271  }
17272  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
17273  __pyx_t_7 = 0;
17274  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error)
17275  __Pyx_GOTREF(__pyx_t_7);
17276  __Pyx_INCREF(__pyx_n_s_u);
17277  __Pyx_GIVEREF(__pyx_n_s_u);
17278  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_u);
17279  __Pyx_INCREF(__pyx_v_ci);
17280  __Pyx_GIVEREF(__pyx_v_ci);
17281  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
17282  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 807, __pyx_L1_error)
17283  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17284  }
17285  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17286  __pyx_t_1 = PySet_New(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
17287  __Pyx_GOTREF(__pyx_t_1);
17288  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17289  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_t_1) < 0) __PYX_ERR(0, 807, __pyx_L1_error)
17290  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17291 
17292  /* "ADR.pyx":808
17293  * self.points_elementBoundaryQuadrature= set()
17294  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17295  * self.vectors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17296  * self.tensors_elementBoundaryQuadrature= set()
17297  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17298  */
17299  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
17300  __Pyx_GOTREF(__pyx_t_1);
17301  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_t_1) < 0) __PYX_ERR(0, 808, __pyx_L1_error)
17302  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17303 
17304  /* "ADR.pyx":809
17305  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17306  * self.vectors_elementBoundaryQuadrature= set()
17307  * self.tensors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17308  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17309  * self.inflowBoundaryBC = {}
17310  */
17311  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error)
17312  __Pyx_GOTREF(__pyx_t_1);
17313  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_t_1) < 0) __PYX_ERR(0, 809, __pyx_L1_error)
17314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17315 
17316  /* "ADR.pyx":810
17317  * self.vectors_elementBoundaryQuadrature= set()
17318  * self.tensors_elementBoundaryQuadrature= set()
17319  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
17320  * self.inflowBoundaryBC = {}
17321  * self.inflowBoundaryBC_values = {}
17322  */
17323  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
17324  __Pyx_GOTREF(__pyx_t_1);
17325  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
17326  __Pyx_GOTREF(__pyx_t_6);
17327  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error)
17328  __Pyx_GOTREF(__pyx_t_7);
17329  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17330  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
17331  __Pyx_GOTREF(__pyx_t_6);
17332  __Pyx_GIVEREF(__pyx_t_7);
17333  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
17334  __pyx_t_7 = 0;
17335  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error)
17336  __Pyx_GOTREF(__pyx_t_7);
17337  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
17338  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 810, __pyx_L1_error)
17339  __Pyx_GOTREF(__pyx_t_14);
17340  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17341  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17342  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17343  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17344 
17345  /* "ADR.pyx":811
17346  * self.tensors_elementBoundaryQuadrature= set()
17347  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17348  * self.inflowBoundaryBC = {} # <<<<<<<<<<<<<<
17349  * self.inflowBoundaryBC_values = {}
17350  * self.inflowFlux = {}
17351  */
17352  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 811, __pyx_L1_error)
17353  __Pyx_GOTREF(__pyx_t_14);
17354  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC, __pyx_t_14) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
17355  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17356 
17357  /* "ADR.pyx":812
17358  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17359  * self.inflowBoundaryBC = {}
17360  * self.inflowBoundaryBC_values = {} # <<<<<<<<<<<<<<
17361  * self.inflowFlux = {}
17362  * for cj in range(self.nc):
17363  */
17364  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 812, __pyx_L1_error)
17365  __Pyx_GOTREF(__pyx_t_14);
17366  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values, __pyx_t_14) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
17367  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17368 
17369  /* "ADR.pyx":813
17370  * self.inflowBoundaryBC = {}
17371  * self.inflowBoundaryBC_values = {}
17372  * self.inflowFlux = {} # <<<<<<<<<<<<<<
17373  * for cj in range(self.nc):
17374  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17375  */
17376  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 813, __pyx_L1_error)
17377  __Pyx_GOTREF(__pyx_t_14);
17378  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux, __pyx_t_14) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
17379  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17380 
17381  /* "ADR.pyx":814
17382  * self.inflowBoundaryBC_values = {}
17383  * self.inflowFlux = {}
17384  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17385  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17386  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17387  */
17388  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 814, __pyx_L1_error)
17389  __Pyx_GOTREF(__pyx_t_14);
17390  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 814, __pyx_L1_error)
17391  __Pyx_GOTREF(__pyx_t_7);
17392  __Pyx_GIVEREF(__pyx_t_14);
17393  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
17394  __pyx_t_14 = 0;
17395  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 814, __pyx_L1_error)
17396  __Pyx_GOTREF(__pyx_t_14);
17397  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17398  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
17399  __pyx_t_7 = __pyx_t_14; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
17400  __pyx_t_5 = NULL;
17401  } else {
17402  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 814, __pyx_L1_error)
17403  __Pyx_GOTREF(__pyx_t_7);
17404  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error)
17405  }
17406  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17407  for (;;) {
17408  if (likely(!__pyx_t_5)) {
17409  if (likely(PyList_CheckExact(__pyx_t_7))) {
17410  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
17411  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17412  __pyx_t_14 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
17413  #else
17414  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 814, __pyx_L1_error)
17415  __Pyx_GOTREF(__pyx_t_14);
17416  #endif
17417  } else {
17418  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
17419  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17420  __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 814, __pyx_L1_error)
17421  #else
17422  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 814, __pyx_L1_error)
17423  __Pyx_GOTREF(__pyx_t_14);
17424  #endif
17425  }
17426  } else {
17427  __pyx_t_14 = __pyx_t_5(__pyx_t_7);
17428  if (unlikely(!__pyx_t_14)) {
17429  PyObject* exc_type = PyErr_Occurred();
17430  if (exc_type) {
17431  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17432  else __PYX_ERR(0, 814, __pyx_L1_error)
17433  }
17434  break;
17435  }
17436  __Pyx_GOTREF(__pyx_t_14);
17437  }
17438  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_14);
17439  __pyx_t_14 = 0;
17440 
17441  /* "ADR.pyx":815
17442  * self.inflowFlux = {}
17443  * for cj in range(self.nc):
17444  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i') # <<<<<<<<<<<<<<
17445  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17446  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17447  */
17448  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17449  __Pyx_GOTREF(__pyx_t_6);
17450  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
17451  __Pyx_GOTREF(__pyx_t_1);
17452  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17453  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17454  __Pyx_GOTREF(__pyx_t_6);
17455  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 815, __pyx_L1_error)
17456  __Pyx_GOTREF(__pyx_t_8);
17457  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17458  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
17459  __Pyx_GOTREF(__pyx_t_6);
17460  __Pyx_GIVEREF(__pyx_t_8);
17461  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
17462  __pyx_t_8 = 0;
17463  __pyx_t_8 = NULL;
17464  __pyx_t_13 = 0;
17465  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
17466  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
17467  if (likely(__pyx_t_8)) {
17468  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17469  __Pyx_INCREF(__pyx_t_8);
17470  __Pyx_INCREF(function);
17471  __Pyx_DECREF_SET(__pyx_t_1, function);
17472  __pyx_t_13 = 1;
17473  }
17474  }
17475  #if CYTHON_FAST_PYCALL
17476  if (PyFunction_Check(__pyx_t_1)) {
17477  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_n_s_i};
17478  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 815, __pyx_L1_error)
17479  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17480  __Pyx_GOTREF(__pyx_t_14);
17481  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17482  } else
17483  #endif
17484  #if CYTHON_FAST_PYCCALL
17485  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
17486  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_n_s_i};
17487  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 815, __pyx_L1_error)
17488  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17489  __Pyx_GOTREF(__pyx_t_14);
17490  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17491  } else
17492  #endif
17493  {
17494  __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
17495  __Pyx_GOTREF(__pyx_t_2);
17496  if (__pyx_t_8) {
17497  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
17498  }
17499  __Pyx_GIVEREF(__pyx_t_6);
17500  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_6);
17501  __Pyx_INCREF(__pyx_n_s_i);
17502  __Pyx_GIVEREF(__pyx_n_s_i);
17503  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_n_s_i);
17504  __pyx_t_6 = 0;
17505  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 815, __pyx_L1_error)
17506  __Pyx_GOTREF(__pyx_t_14);
17507  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17508  }
17509  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17510  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
17511  __Pyx_GOTREF(__pyx_t_1);
17512  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_cj, __pyx_t_14) < 0)) __PYX_ERR(0, 815, __pyx_L1_error)
17513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17514  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17515 
17516  /* "ADR.pyx":816
17517  * for cj in range(self.nc):
17518  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17519  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d') # <<<<<<<<<<<<<<
17520  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17521  * self.internalNodes = set(range(self.mesh.nNodes_global))
17522  */
17523  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
17524  __Pyx_GOTREF(__pyx_t_1);
17525  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
17526  __Pyx_GOTREF(__pyx_t_2);
17527  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17528  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
17529  __Pyx_GOTREF(__pyx_t_1);
17530  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
17531  __Pyx_GOTREF(__pyx_t_6);
17532  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17533  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
17534  __Pyx_GOTREF(__pyx_t_1);
17535  __pyx_t_8 = PyObject_GetItem(__pyx_t_1, __pyx_v_cj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error)
17536  __Pyx_GOTREF(__pyx_t_8);
17537  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17538  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
17539  __Pyx_GOTREF(__pyx_t_1);
17540  __Pyx_GIVEREF(__pyx_t_6);
17541  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
17542  __Pyx_GIVEREF(__pyx_t_8);
17543  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
17544  __pyx_t_6 = 0;
17545  __pyx_t_8 = 0;
17546  __pyx_t_8 = NULL;
17547  __pyx_t_13 = 0;
17548  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
17549  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
17550  if (likely(__pyx_t_8)) {
17551  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17552  __Pyx_INCREF(__pyx_t_8);
17553  __Pyx_INCREF(function);
17554  __Pyx_DECREF_SET(__pyx_t_2, function);
17555  __pyx_t_13 = 1;
17556  }
17557  }
17558  #if CYTHON_FAST_PYCALL
17559  if (PyFunction_Check(__pyx_t_2)) {
17560  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_n_s_d};
17561  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 816, __pyx_L1_error)
17562  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17563  __Pyx_GOTREF(__pyx_t_14);
17564  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17565  } else
17566  #endif
17567  #if CYTHON_FAST_PYCCALL
17568  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
17569  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_1, __pyx_n_s_d};
17570  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 816, __pyx_L1_error)
17571  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17572  __Pyx_GOTREF(__pyx_t_14);
17573  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17574  } else
17575  #endif
17576  {
17577  __pyx_t_6 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
17578  __Pyx_GOTREF(__pyx_t_6);
17579  if (__pyx_t_8) {
17580  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
17581  }
17582  __Pyx_GIVEREF(__pyx_t_1);
17583  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_t_1);
17584  __Pyx_INCREF(__pyx_n_s_d);
17585  __Pyx_GIVEREF(__pyx_n_s_d);
17586  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_n_s_d);
17587  __pyx_t_1 = 0;
17588  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 816, __pyx_L1_error)
17589  __Pyx_GOTREF(__pyx_t_14);
17590  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17591  }
17592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17593  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
17594  __Pyx_GOTREF(__pyx_t_2);
17595  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_cj, __pyx_t_14) < 0)) __PYX_ERR(0, 816, __pyx_L1_error)
17596  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17597  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17598 
17599  /* "ADR.pyx":817
17600  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17601  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17602  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
17603  * self.internalNodes = set(range(self.mesh.nNodes_global))
17604  * #identify the internal nodes this is ought to be in mesh
17605  */
17606  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
17607  __Pyx_GOTREF(__pyx_t_2);
17608  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
17609  __Pyx_GOTREF(__pyx_t_6);
17610  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17611  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
17612  __Pyx_GOTREF(__pyx_t_2);
17613  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
17614  __Pyx_GOTREF(__pyx_t_1);
17615  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17616  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
17617  __Pyx_GOTREF(__pyx_t_2);
17618  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 817, __pyx_L1_error)
17619  __Pyx_GOTREF(__pyx_t_8);
17620  __Pyx_GIVEREF(__pyx_t_1);
17621  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
17622  __Pyx_GIVEREF(__pyx_t_2);
17623  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
17624  __pyx_t_1 = 0;
17625  __pyx_t_2 = 0;
17626  __pyx_t_2 = NULL;
17627  __pyx_t_13 = 0;
17628  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17629  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
17630  if (likely(__pyx_t_2)) {
17631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17632  __Pyx_INCREF(__pyx_t_2);
17633  __Pyx_INCREF(function);
17634  __Pyx_DECREF_SET(__pyx_t_6, function);
17635  __pyx_t_13 = 1;
17636  }
17637  }
17638  #if CYTHON_FAST_PYCALL
17639  if (PyFunction_Check(__pyx_t_6)) {
17640  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
17641  __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 817, __pyx_L1_error)
17642  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
17643  __Pyx_GOTREF(__pyx_t_14);
17644  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17645  } else
17646  #endif
17647  #if CYTHON_FAST_PYCCALL
17648  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17649  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_n_s_d};
17650  __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 817, __pyx_L1_error)
17651  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
17652  __Pyx_GOTREF(__pyx_t_14);
17653  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17654  } else
17655  #endif
17656  {
17657  __pyx_t_1 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
17658  __Pyx_GOTREF(__pyx_t_1);
17659  if (__pyx_t_2) {
17660  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
17661  }
17662  __Pyx_GIVEREF(__pyx_t_8);
17663  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_8);
17664  __Pyx_INCREF(__pyx_n_s_d);
17665  __Pyx_GIVEREF(__pyx_n_s_d);
17666  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_n_s_d);
17667  __pyx_t_8 = 0;
17668  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 817, __pyx_L1_error)
17669  __Pyx_GOTREF(__pyx_t_14);
17670  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17671  }
17672  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17673  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
17674  __Pyx_GOTREF(__pyx_t_6);
17675  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_cj, __pyx_t_14) < 0)) __PYX_ERR(0, 817, __pyx_L1_error)
17676  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17677  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17678 
17679  /* "ADR.pyx":814
17680  * self.inflowBoundaryBC_values = {}
17681  * self.inflowFlux = {}
17682  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17683  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17684  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17685  */
17686  }
17687  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17688 
17689  /* "ADR.pyx":818
17690  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17691  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17692  * self.internalNodes = set(range(self.mesh.nNodes_global)) # <<<<<<<<<<<<<<
17693  * #identify the internal nodes this is ought to be in mesh
17694  * ##\todo move this to mesh
17695  */
17696  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error)
17697  __Pyx_GOTREF(__pyx_t_7);
17698  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 818, __pyx_L1_error)
17699  __Pyx_GOTREF(__pyx_t_14);
17700  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17701  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error)
17702  __Pyx_GOTREF(__pyx_t_7);
17703  __Pyx_GIVEREF(__pyx_t_14);
17704  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
17705  __pyx_t_14 = 0;
17706  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 818, __pyx_L1_error)
17707  __Pyx_GOTREF(__pyx_t_14);
17708  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17709  __pyx_t_7 = PySet_New(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error)
17710  __Pyx_GOTREF(__pyx_t_7);
17711  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17712  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_7) < 0) __PYX_ERR(0, 818, __pyx_L1_error)
17713  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17714 
17715  /* "ADR.pyx":821
17716  * #identify the internal nodes this is ought to be in mesh
17717  * ##\todo move this to mesh
17718  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17719  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17720  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17721  */
17722  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 821, __pyx_L1_error)
17723  __Pyx_GOTREF(__pyx_t_7);
17724  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error)
17725  __Pyx_GOTREF(__pyx_t_14);
17726  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17727  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 821, __pyx_L1_error)
17728  __Pyx_GOTREF(__pyx_t_7);
17729  __Pyx_GIVEREF(__pyx_t_14);
17730  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
17731  __pyx_t_14 = 0;
17732  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error)
17733  __Pyx_GOTREF(__pyx_t_14);
17734  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17735  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
17736  __pyx_t_7 = __pyx_t_14; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
17737  __pyx_t_5 = NULL;
17738  } else {
17739  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 821, __pyx_L1_error)
17740  __Pyx_GOTREF(__pyx_t_7);
17741  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
17742  }
17743  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17744  for (;;) {
17745  if (likely(!__pyx_t_5)) {
17746  if (likely(PyList_CheckExact(__pyx_t_7))) {
17747  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
17748  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17749  __pyx_t_14 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
17750  #else
17751  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error)
17752  __Pyx_GOTREF(__pyx_t_14);
17753  #endif
17754  } else {
17755  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
17756  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17757  __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
17758  #else
17759  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error)
17760  __Pyx_GOTREF(__pyx_t_14);
17761  #endif
17762  }
17763  } else {
17764  __pyx_t_14 = __pyx_t_5(__pyx_t_7);
17765  if (unlikely(!__pyx_t_14)) {
17766  PyObject* exc_type = PyErr_Occurred();
17767  if (exc_type) {
17768  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17769  else __PYX_ERR(0, 821, __pyx_L1_error)
17770  }
17771  break;
17772  }
17773  __Pyx_GOTREF(__pyx_t_14);
17774  }
17775  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_14);
17776  __pyx_t_14 = 0;
17777 
17778  /* "ADR.pyx":822
17779  * ##\todo move this to mesh
17780  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17781  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
17782  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17783  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17784  */
17785  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 822, __pyx_L1_error)
17786  __Pyx_GOTREF(__pyx_t_14);
17787  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
17788  __Pyx_GOTREF(__pyx_t_6);
17789  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17790  __pyx_t_14 = PyObject_GetItem(__pyx_t_6, __pyx_v_ebNE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 822, __pyx_L1_error)
17791  __Pyx_GOTREF(__pyx_t_14);
17792  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17793  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_14);
17794  __pyx_t_14 = 0;
17795 
17796  /* "ADR.pyx":823
17797  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17798  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17799  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0] # <<<<<<<<<<<<<<
17800  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17801  * for i in range(self.mesh.nNodes_element):
17802  */
17803  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 823, __pyx_L1_error)
17804  __Pyx_GOTREF(__pyx_t_14);
17805  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error)
17806  __Pyx_GOTREF(__pyx_t_6);
17807  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17808  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 823, __pyx_L1_error)
17809  __Pyx_GOTREF(__pyx_t_14);
17810  __Pyx_INCREF(__pyx_v_ebN);
17811  __Pyx_GIVEREF(__pyx_v_ebN);
17812  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_ebN);
17813  __Pyx_INCREF(__pyx_int_0);
17814  __Pyx_GIVEREF(__pyx_int_0);
17815  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_0);
17816  __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error)
17817  __Pyx_GOTREF(__pyx_t_1);
17818  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17819  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17820  __Pyx_XDECREF_SET(__pyx_v_eN_global, __pyx_t_1);
17821  __pyx_t_1 = 0;
17822 
17823  /* "ADR.pyx":824
17824  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17825  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17826  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0] # <<<<<<<<<<<<<<
17827  * for i in range(self.mesh.nNodes_element):
17828  * if i != ebN_element:
17829  */
17830  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error)
17831  __Pyx_GOTREF(__pyx_t_1);
17832  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 824, __pyx_L1_error)
17833  __Pyx_GOTREF(__pyx_t_14);
17834  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17835  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error)
17836  __Pyx_GOTREF(__pyx_t_1);
17837  __Pyx_INCREF(__pyx_v_ebN);
17838  __Pyx_GIVEREF(__pyx_v_ebN);
17839  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ebN);
17840  __Pyx_INCREF(__pyx_int_0);
17841  __Pyx_GIVEREF(__pyx_int_0);
17842  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_0);
17843  __pyx_t_6 = PyObject_GetItem(__pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error)
17844  __Pyx_GOTREF(__pyx_t_6);
17845  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17846  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17847  __Pyx_XDECREF_SET(__pyx_v_ebN_element, __pyx_t_6);
17848  __pyx_t_6 = 0;
17849 
17850  /* "ADR.pyx":825
17851  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17852  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17853  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17854  * if i != ebN_element:
17855  * I = self.mesh.elementNodesArray[eN_global,i]
17856  */
17857  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17858  __Pyx_GOTREF(__pyx_t_6);
17859  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
17860  __Pyx_GOTREF(__pyx_t_1);
17861  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17862  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17863  __Pyx_GOTREF(__pyx_t_6);
17864  __Pyx_GIVEREF(__pyx_t_1);
17865  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
17866  __pyx_t_1 = 0;
17867  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
17868  __Pyx_GOTREF(__pyx_t_1);
17869  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17870  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
17871  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
17872  __pyx_t_10 = NULL;
17873  } else {
17874  __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error)
17875  __Pyx_GOTREF(__pyx_t_6);
17876  __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 825, __pyx_L1_error)
17877  }
17878  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17879  for (;;) {
17880  if (likely(!__pyx_t_10)) {
17881  if (likely(PyList_CheckExact(__pyx_t_6))) {
17882  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
17883  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17884  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
17885  #else
17886  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
17887  __Pyx_GOTREF(__pyx_t_1);
17888  #endif
17889  } else {
17890  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
17891  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17892  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
17893  #else
17894  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
17895  __Pyx_GOTREF(__pyx_t_1);
17896  #endif
17897  }
17898  } else {
17899  __pyx_t_1 = __pyx_t_10(__pyx_t_6);
17900  if (unlikely(!__pyx_t_1)) {
17901  PyObject* exc_type = PyErr_Occurred();
17902  if (exc_type) {
17903  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17904  else __PYX_ERR(0, 825, __pyx_L1_error)
17905  }
17906  break;
17907  }
17908  __Pyx_GOTREF(__pyx_t_1);
17909  }
17910  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
17911  __pyx_t_1 = 0;
17912 
17913  /* "ADR.pyx":826
17914  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17915  * for i in range(self.mesh.nNodes_element):
17916  * if i != ebN_element: # <<<<<<<<<<<<<<
17917  * I = self.mesh.elementNodesArray[eN_global,i]
17918  * self.internalNodes -= set([I])
17919  */
17920  __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_ebN_element, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
17921  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
17922  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17923  if (__pyx_t_15) {
17924 
17925  /* "ADR.pyx":827
17926  * for i in range(self.mesh.nNodes_element):
17927  * if i != ebN_element:
17928  * I = self.mesh.elementNodesArray[eN_global,i] # <<<<<<<<<<<<<<
17929  * self.internalNodes -= set([I])
17930  * self.nNodes_internal = len(self.internalNodes)
17931  */
17932  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
17933  __Pyx_GOTREF(__pyx_t_1);
17934  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 827, __pyx_L1_error)
17935  __Pyx_GOTREF(__pyx_t_14);
17936  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17937  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
17938  __Pyx_GOTREF(__pyx_t_1);
17939  __Pyx_INCREF(__pyx_v_eN_global);
17940  __Pyx_GIVEREF(__pyx_v_eN_global);
17941  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_eN_global);
17942  __Pyx_INCREF(__pyx_v_i);
17943  __Pyx_GIVEREF(__pyx_v_i);
17944  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i);
17945  __pyx_t_8 = PyObject_GetItem(__pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error)
17946  __Pyx_GOTREF(__pyx_t_8);
17947  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17948  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17949  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_8);
17950  __pyx_t_8 = 0;
17951 
17952  /* "ADR.pyx":828
17953  * if i != ebN_element:
17954  * I = self.mesh.elementNodesArray[eN_global,i]
17955  * self.internalNodes -= set([I]) # <<<<<<<<<<<<<<
17956  * self.nNodes_internal = len(self.internalNodes)
17957  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17958  */
17959  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L1_error)
17960  __Pyx_GOTREF(__pyx_t_8);
17961  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
17962  __Pyx_GOTREF(__pyx_t_1);
17963  if (PySet_Add(__pyx_t_1, __pyx_v_I) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
17964  __pyx_t_14 = PyNumber_InPlaceSubtract(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 828, __pyx_L1_error)
17965  __Pyx_GOTREF(__pyx_t_14);
17966  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17967  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17968  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_14) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
17969  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
17970 
17971  /* "ADR.pyx":826
17972  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17973  * for i in range(self.mesh.nNodes_element):
17974  * if i != ebN_element: # <<<<<<<<<<<<<<
17975  * I = self.mesh.elementNodesArray[eN_global,i]
17976  * self.internalNodes -= set([I])
17977  */
17978  }
17979 
17980  /* "ADR.pyx":825
17981  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17982  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17983  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17984  * if i != ebN_element:
17985  * I = self.mesh.elementNodesArray[eN_global,i]
17986  */
17987  }
17988  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17989 
17990  /* "ADR.pyx":821
17991  * #identify the internal nodes this is ought to be in mesh
17992  * ##\todo move this to mesh
17993  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17994  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17995  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17996  */
17997  }
17998  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17999 
18000  /* "ADR.pyx":829
18001  * I = self.mesh.elementNodesArray[eN_global,i]
18002  * self.internalNodes -= set([I])
18003  * self.nNodes_internal = len(self.internalNodes) # <<<<<<<<<<<<<<
18004  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18005  * for nI,n in enumerate(self.internalNodes):
18006  */
18007  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 829, __pyx_L1_error)
18008  __Pyx_GOTREF(__pyx_t_7);
18009  __pyx_t_4 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 829, __pyx_L1_error)
18010  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18011  __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 829, __pyx_L1_error)
18012  __Pyx_GOTREF(__pyx_t_7);
18013  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal, __pyx_t_7) < 0) __PYX_ERR(0, 829, __pyx_L1_error)
18014  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18015 
18016  /* "ADR.pyx":830
18017  * self.internalNodes -= set([I])
18018  * self.nNodes_internal = len(self.internalNodes)
18019  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i') # <<<<<<<<<<<<<<
18020  * for nI,n in enumerate(self.internalNodes):
18021  * self.internalNodesArray[nI]=n
18022  */
18023  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
18024  __Pyx_GOTREF(__pyx_t_6);
18025  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 830, __pyx_L1_error)
18026  __Pyx_GOTREF(__pyx_t_14);
18027  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18028  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
18029  __Pyx_GOTREF(__pyx_t_6);
18030  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
18031  __Pyx_GOTREF(__pyx_t_1);
18032  __Pyx_GIVEREF(__pyx_t_6);
18033  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
18034  __pyx_t_6 = 0;
18035  __pyx_t_6 = NULL;
18036  __pyx_t_13 = 0;
18037  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
18038  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_14);
18039  if (likely(__pyx_t_6)) {
18040  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
18041  __Pyx_INCREF(__pyx_t_6);
18042  __Pyx_INCREF(function);
18043  __Pyx_DECREF_SET(__pyx_t_14, function);
18044  __pyx_t_13 = 1;
18045  }
18046  }
18047  #if CYTHON_FAST_PYCALL
18048  if (PyFunction_Check(__pyx_t_14)) {
18049  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_n_s_i};
18050  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
18051  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18052  __Pyx_GOTREF(__pyx_t_7);
18053  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18054  } else
18055  #endif
18056  #if CYTHON_FAST_PYCCALL
18057  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
18058  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_n_s_i};
18059  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
18060  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18061  __Pyx_GOTREF(__pyx_t_7);
18062  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18063  } else
18064  #endif
18065  {
18066  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error)
18067  __Pyx_GOTREF(__pyx_t_8);
18068  if (__pyx_t_6) {
18069  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
18070  }
18071  __Pyx_GIVEREF(__pyx_t_1);
18072  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_1);
18073  __Pyx_INCREF(__pyx_n_s_i);
18074  __Pyx_GIVEREF(__pyx_n_s_i);
18075  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_i);
18076  __pyx_t_1 = 0;
18077  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
18078  __Pyx_GOTREF(__pyx_t_7);
18079  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18080  }
18081  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18082  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray, __pyx_t_7) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
18083  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18084 
18085  /* "ADR.pyx":831
18086  * self.nNodes_internal = len(self.internalNodes)
18087  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18088  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
18089  * self.internalNodesArray[nI]=n
18090  * #
18091  */
18092  __Pyx_INCREF(__pyx_int_0);
18093  __pyx_t_7 = __pyx_int_0;
18094  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 831, __pyx_L1_error)
18095  __Pyx_GOTREF(__pyx_t_14);
18096  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
18097  __pyx_t_8 = __pyx_t_14; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
18098  __pyx_t_5 = NULL;
18099  } else {
18100  __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 831, __pyx_L1_error)
18101  __Pyx_GOTREF(__pyx_t_8);
18102  __pyx_t_5 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
18103  }
18104  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18105  for (;;) {
18106  if (likely(!__pyx_t_5)) {
18107  if (likely(PyList_CheckExact(__pyx_t_8))) {
18108  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
18109  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18110  __pyx_t_14 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 831, __pyx_L1_error)
18111  #else
18112  __pyx_t_14 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 831, __pyx_L1_error)
18113  __Pyx_GOTREF(__pyx_t_14);
18114  #endif
18115  } else {
18116  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
18117  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18118  __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 831, __pyx_L1_error)
18119  #else
18120  __pyx_t_14 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 831, __pyx_L1_error)
18121  __Pyx_GOTREF(__pyx_t_14);
18122  #endif
18123  }
18124  } else {
18125  __pyx_t_14 = __pyx_t_5(__pyx_t_8);
18126  if (unlikely(!__pyx_t_14)) {
18127  PyObject* exc_type = PyErr_Occurred();
18128  if (exc_type) {
18129  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18130  else __PYX_ERR(0, 831, __pyx_L1_error)
18131  }
18132  break;
18133  }
18134  __Pyx_GOTREF(__pyx_t_14);
18135  }
18136  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_14);
18137  __pyx_t_14 = 0;
18138  __Pyx_INCREF(__pyx_t_7);
18139  __Pyx_XDECREF_SET(__pyx_v_nI, __pyx_t_7);
18140  __pyx_t_14 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 831, __pyx_L1_error)
18141  __Pyx_GOTREF(__pyx_t_14);
18142  __Pyx_DECREF(__pyx_t_7);
18143  __pyx_t_7 = __pyx_t_14;
18144  __pyx_t_14 = 0;
18145 
18146  /* "ADR.pyx":832
18147  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18148  * for nI,n in enumerate(self.internalNodes):
18149  * self.internalNodesArray[nI]=n # <<<<<<<<<<<<<<
18150  * #
18151  * del self.internalNodes
18152  */
18153  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 832, __pyx_L1_error)
18154  __Pyx_GOTREF(__pyx_t_14);
18155  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_v_nI, __pyx_v_n) < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
18156  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18157 
18158  /* "ADR.pyx":831
18159  * self.nNodes_internal = len(self.internalNodes)
18160  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
18161  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
18162  * self.internalNodesArray[nI]=n
18163  * #
18164  */
18165  }
18166  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18167  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18168 
18169  /* "ADR.pyx":834
18170  * self.internalNodesArray[nI]=n
18171  * #
18172  * del self.internalNodes # <<<<<<<<<<<<<<
18173  * self.internalNodes = None
18174  * log("Updating local to global mappings",2)
18175  */
18176  if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_internalNodes) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
18177 
18178  /* "ADR.pyx":835
18179  * #
18180  * del self.internalNodes
18181  * self.internalNodes = None # <<<<<<<<<<<<<<
18182  * log("Updating local to global mappings",2)
18183  * self.updateLocal2Global()
18184  */
18185  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, Py_None) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
18186 
18187  /* "ADR.pyx":836
18188  * del self.internalNodes
18189  * self.internalNodes = None
18190  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
18191  * self.updateLocal2Global()
18192  * log("Building time integration object",2)
18193  */
18194  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 836, __pyx_L1_error)
18195  __Pyx_GOTREF(__pyx_t_7);
18196  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 836, __pyx_L1_error)
18197  __Pyx_GOTREF(__pyx_t_8);
18198  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18199  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18200 
18201  /* "ADR.pyx":837
18202  * self.internalNodes = None
18203  * log("Updating local to global mappings",2)
18204  * self.updateLocal2Global() # <<<<<<<<<<<<<<
18205  * log("Building time integration object",2)
18206  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18207  */
18208  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateLocal2Global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 837, __pyx_L1_error)
18209  __Pyx_GOTREF(__pyx_t_7);
18210  __pyx_t_14 = NULL;
18211  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
18212  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
18213  if (likely(__pyx_t_14)) {
18214  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18215  __Pyx_INCREF(__pyx_t_14);
18216  __Pyx_INCREF(function);
18217  __Pyx_DECREF_SET(__pyx_t_7, function);
18218  }
18219  }
18220  if (__pyx_t_14) {
18221  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 837, __pyx_L1_error)
18222  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18223  } else {
18224  __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 837, __pyx_L1_error)
18225  }
18226  __Pyx_GOTREF(__pyx_t_8);
18227  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18228  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18229 
18230  /* "ADR.pyx":838
18231  * log("Updating local to global mappings",2)
18232  * self.updateLocal2Global()
18233  * log("Building time integration object",2) # <<<<<<<<<<<<<<
18234  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18235  * #mwf for interpolating subgrid error for gradients etc
18236  */
18237  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 838, __pyx_L1_error)
18238  __Pyx_GOTREF(__pyx_t_8);
18239  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 838, __pyx_L1_error)
18240  __Pyx_GOTREF(__pyx_t_7);
18241  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18242  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18243 
18244  /* "ADR.pyx":839
18245  * self.updateLocal2Global()
18246  * log("Building time integration object",2)
18247  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18248  * #mwf for interpolating subgrid error for gradients etc
18249  * if self.stabilization and self.stabilization.usesGradientStabilization:
18250  */
18251  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 839, __pyx_L1_error)
18252  __Pyx_GOTREF(__pyx_t_7);
18253  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
18254  __Pyx_GOTREF(__pyx_t_8);
18255  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
18256  __Pyx_GOTREF(__pyx_t_14);
18257  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18258  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error)
18259  __Pyx_GOTREF(__pyx_t_8);
18260  __Pyx_GIVEREF(__pyx_t_14);
18261  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14);
18262  __pyx_t_14 = 0;
18263  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
18264  __Pyx_GOTREF(__pyx_t_14);
18265  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
18266  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
18267  __Pyx_GOTREF(__pyx_t_1);
18268  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18269  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18270  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18271  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18272 
18273  /* "ADR.pyx":841
18274  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18275  * #mwf for interpolating subgrid error for gradients etc
18276  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
18277  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18278  * else:
18279  */
18280  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
18281  __Pyx_GOTREF(__pyx_t_1);
18282  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
18283  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18284  if (__pyx_t_3) {
18285  } else {
18286  __pyx_t_15 = __pyx_t_3;
18287  goto __pyx_L103_bool_binop_done;
18288  }
18289  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
18290  __Pyx_GOTREF(__pyx_t_1);
18291  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_usesGradientStabilization); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 841, __pyx_L1_error)
18292  __Pyx_GOTREF(__pyx_t_14);
18293  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18294  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
18295  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18296  __pyx_t_15 = __pyx_t_3;
18297  __pyx_L103_bool_binop_done:;
18298  if (__pyx_t_15) {
18299 
18300  /* "ADR.pyx":842
18301  * #mwf for interpolating subgrid error for gradients etc
18302  * if self.stabilization and self.stabilization.usesGradientStabilization:
18303  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True) # <<<<<<<<<<<<<<
18304  * else:
18305  * self.timeIntegration = TimeIntegrationClass(self)
18306  */
18307  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 842, __pyx_L1_error)
18308  __Pyx_GOTREF(__pyx_t_14);
18309  __Pyx_INCREF(__pyx_v_self);
18310  __Pyx_GIVEREF(__pyx_v_self);
18311  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_self);
18312  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
18313  __Pyx_GOTREF(__pyx_t_1);
18314  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_integrateInterpolationPoints, Py_True) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
18315  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_TimeIntegrationClass, __pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L1_error)
18316  __Pyx_GOTREF(__pyx_t_8);
18317  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18318  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18319  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_8) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
18320  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18321 
18322  /* "ADR.pyx":841
18323  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18324  * #mwf for interpolating subgrid error for gradients etc
18325  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
18326  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18327  * else:
18328  */
18329  goto __pyx_L102;
18330  }
18331 
18332  /* "ADR.pyx":844
18333  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18334  * else:
18335  * self.timeIntegration = TimeIntegrationClass(self) # <<<<<<<<<<<<<<
18336  *
18337  * if options != None:
18338  */
18339  /*else*/ {
18340  __Pyx_INCREF(__pyx_v_TimeIntegrationClass);
18341  __pyx_t_1 = __pyx_v_TimeIntegrationClass; __pyx_t_14 = NULL;
18342  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
18343  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
18344  if (likely(__pyx_t_14)) {
18345  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18346  __Pyx_INCREF(__pyx_t_14);
18347  __Pyx_INCREF(function);
18348  __Pyx_DECREF_SET(__pyx_t_1, function);
18349  }
18350  }
18351  if (!__pyx_t_14) {
18352  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
18353  __Pyx_GOTREF(__pyx_t_8);
18354  } else {
18355  #if CYTHON_FAST_PYCALL
18356  if (PyFunction_Check(__pyx_t_1)) {
18357  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_self};
18358  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
18359  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18360  __Pyx_GOTREF(__pyx_t_8);
18361  } else
18362  #endif
18363  #if CYTHON_FAST_PYCCALL
18364  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
18365  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_self};
18366  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
18367  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18368  __Pyx_GOTREF(__pyx_t_8);
18369  } else
18370  #endif
18371  {
18372  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 844, __pyx_L1_error)
18373  __Pyx_GOTREF(__pyx_t_7);
18374  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14); __pyx_t_14 = NULL;
18375  __Pyx_INCREF(__pyx_v_self);
18376  __Pyx_GIVEREF(__pyx_v_self);
18377  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self);
18378  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
18379  __Pyx_GOTREF(__pyx_t_8);
18380  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18381  }
18382  }
18383  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18384  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_8) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
18385  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18386  }
18387  __pyx_L102:;
18388 
18389  /* "ADR.pyx":846
18390  * self.timeIntegration = TimeIntegrationClass(self)
18391  *
18392  * if options != None: # <<<<<<<<<<<<<<
18393  * self.timeIntegration.setFromOptions(options)
18394  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18395  */
18396  __pyx_t_8 = PyObject_RichCompare(__pyx_v_options, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error)
18397  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
18398  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18399  if (__pyx_t_15) {
18400 
18401  /* "ADR.pyx":847
18402  *
18403  * if options != None:
18404  * self.timeIntegration.setFromOptions(options) # <<<<<<<<<<<<<<
18405  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18406  * log("Calculating numerical quadrature formulas",2)
18407  */
18408  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
18409  __Pyx_GOTREF(__pyx_t_1);
18410  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_setFromOptions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 847, __pyx_L1_error)
18411  __Pyx_GOTREF(__pyx_t_7);
18412  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18413  __pyx_t_1 = NULL;
18414  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
18415  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
18416  if (likely(__pyx_t_1)) {
18417  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18418  __Pyx_INCREF(__pyx_t_1);
18419  __Pyx_INCREF(function);
18420  __Pyx_DECREF_SET(__pyx_t_7, function);
18421  }
18422  }
18423  if (!__pyx_t_1) {
18424  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_options); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
18425  __Pyx_GOTREF(__pyx_t_8);
18426  } else {
18427  #if CYTHON_FAST_PYCALL
18428  if (PyFunction_Check(__pyx_t_7)) {
18429  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_options};
18430  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
18431  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
18432  __Pyx_GOTREF(__pyx_t_8);
18433  } else
18434  #endif
18435  #if CYTHON_FAST_PYCCALL
18436  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
18437  PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_options};
18438  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
18439  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
18440  __Pyx_GOTREF(__pyx_t_8);
18441  } else
18442  #endif
18443  {
18444  __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 847, __pyx_L1_error)
18445  __Pyx_GOTREF(__pyx_t_14);
18446  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); __pyx_t_1 = NULL;
18447  __Pyx_INCREF(__pyx_v_options);
18448  __Pyx_GIVEREF(__pyx_v_options);
18449  PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_v_options);
18450  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error)
18451  __Pyx_GOTREF(__pyx_t_8);
18452  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18453  }
18454  }
18455  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18456  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18457 
18458  /* "ADR.pyx":846
18459  * self.timeIntegration = TimeIntegrationClass(self)
18460  *
18461  * if options != None: # <<<<<<<<<<<<<<
18462  * self.timeIntegration.setFromOptions(options)
18463  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18464  */
18465  }
18466 
18467  /* "ADR.pyx":848
18468  * if options != None:
18469  * self.timeIntegration.setFromOptions(options)
18470  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18471  * log("Calculating numerical quadrature formulas",2)
18472  * self.calculateQuadrature()
18473  */
18474  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error)
18475  __Pyx_GOTREF(__pyx_t_8);
18476  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error)
18477  __Pyx_GOTREF(__pyx_t_7);
18478  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 848, __pyx_L1_error)
18479  __Pyx_GOTREF(__pyx_t_14);
18480  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18481  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error)
18482  __Pyx_GOTREF(__pyx_t_7);
18483  __Pyx_GIVEREF(__pyx_t_14);
18484  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
18485  __pyx_t_14 = 0;
18486  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 848, __pyx_L1_error)
18487  __Pyx_GOTREF(__pyx_t_14);
18488  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
18489  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
18490  __Pyx_GOTREF(__pyx_t_1);
18491  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18492  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18493  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18494  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18495 
18496  /* "ADR.pyx":849
18497  * self.timeIntegration.setFromOptions(options)
18498  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18499  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
18500  * self.calculateQuadrature()
18501  *
18502  */
18503  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
18504  __Pyx_GOTREF(__pyx_t_1);
18505  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 849, __pyx_L1_error)
18506  __Pyx_GOTREF(__pyx_t_14);
18507  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18508  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18509 
18510  /* "ADR.pyx":850
18511  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18512  * log("Calculating numerical quadrature formulas",2)
18513  * self.calculateQuadrature() # <<<<<<<<<<<<<<
18514  *
18515  * comm = Comm.get()
18516  */
18517  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculateQuadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
18518  __Pyx_GOTREF(__pyx_t_1);
18519  __pyx_t_7 = NULL;
18520  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
18521  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
18522  if (likely(__pyx_t_7)) {
18523  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18524  __Pyx_INCREF(__pyx_t_7);
18525  __Pyx_INCREF(function);
18526  __Pyx_DECREF_SET(__pyx_t_1, function);
18527  }
18528  }
18529  if (__pyx_t_7) {
18530  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 850, __pyx_L1_error)
18531  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18532  } else {
18533  __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 850, __pyx_L1_error)
18534  }
18535  __Pyx_GOTREF(__pyx_t_14);
18536  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18537  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18538 
18539  /* "ADR.pyx":852
18540  * self.calculateQuadrature()
18541  *
18542  * comm = Comm.get() # <<<<<<<<<<<<<<
18543  * self.comm=comm
18544  * if comm.size() > 1:
18545  */
18546  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_Comm, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)
18547  __Pyx_GOTREF(__pyx_t_1);
18548  __pyx_t_7 = NULL;
18549  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
18550  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
18551  if (likely(__pyx_t_7)) {
18552  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18553  __Pyx_INCREF(__pyx_t_7);
18554  __Pyx_INCREF(function);
18555  __Pyx_DECREF_SET(__pyx_t_1, function);
18556  }
18557  }
18558  if (__pyx_t_7) {
18559  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 852, __pyx_L1_error)
18560  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18561  } else {
18562  __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 852, __pyx_L1_error)
18563  }
18564  __Pyx_GOTREF(__pyx_t_14);
18565  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18566  __pyx_v_comm = __pyx_t_14;
18567  __pyx_t_14 = 0;
18568 
18569  /* "ADR.pyx":853
18570  *
18571  * comm = Comm.get()
18572  * self.comm=comm # <<<<<<<<<<<<<<
18573  * if comm.size() > 1:
18574  * assert numericalFluxType != None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18575  */
18576  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comm, __pyx_v_comm) < 0) __PYX_ERR(0, 853, __pyx_L1_error)
18577 
18578  /* "ADR.pyx":854
18579  * comm = Comm.get()
18580  * self.comm=comm
18581  * if comm.size() > 1: # <<<<<<<<<<<<<<
18582  * assert numericalFluxType != None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18583  *
18584  */
18585  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)
18586  __Pyx_GOTREF(__pyx_t_1);
18587  __pyx_t_7 = NULL;
18588  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
18589  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
18590  if (likely(__pyx_t_7)) {
18591  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18592  __Pyx_INCREF(__pyx_t_7);
18593  __Pyx_INCREF(function);
18594  __Pyx_DECREF_SET(__pyx_t_1, function);
18595  }
18596  }
18597  if (__pyx_t_7) {
18598  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 854, __pyx_L1_error)
18599  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18600  } else {
18601  __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 854, __pyx_L1_error)
18602  }
18603  __Pyx_GOTREF(__pyx_t_14);
18604  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18605  __pyx_t_1 = PyObject_RichCompare(__pyx_t_14, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)
18606  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18607  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
18608  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18609  if (__pyx_t_15) {
18610 
18611  /* "ADR.pyx":855
18612  * self.comm=comm
18613  * if comm.size() > 1:
18614  * assert numericalFluxType != None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs" # <<<<<<<<<<<<<<
18615  *
18616  * self.setupFieldStrides()
18617  */
18618  #ifndef CYTHON_WITHOUT_ASSERTIONS
18619  if (unlikely(!Py_OptimizeFlag)) {
18620  __pyx_t_1 = PyObject_RichCompare(__pyx_v_numericalFluxType, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
18621  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
18622  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18623  if (__pyx_t_3) {
18624  } else {
18625  __pyx_t_15 = __pyx_t_3;
18626  goto __pyx_L107_bool_binop_done;
18627  }
18628  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numericalFluxType, __pyx_n_s_useWeakDirichletConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
18629  __Pyx_GOTREF(__pyx_t_1);
18630  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
18631  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18632  __pyx_t_15 = __pyx_t_3;
18633  __pyx_L107_bool_binop_done:;
18634  if (unlikely(!__pyx_t_15)) {
18635  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_You_must_use_a_numerical_flux_to);
18636  __PYX_ERR(0, 855, __pyx_L1_error)
18637  }
18638  }
18639  #endif
18640 
18641  /* "ADR.pyx":854
18642  * comm = Comm.get()
18643  * self.comm=comm
18644  * if comm.size() > 1: # <<<<<<<<<<<<<<
18645  * assert numericalFluxType != None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18646  *
18647  */
18648  }
18649 
18650  /* "ADR.pyx":857
18651  * assert numericalFluxType != None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18652  *
18653  * self.setupFieldStrides() # <<<<<<<<<<<<<<
18654  *
18655  * log(memory("stride+offset","OneLevelTransport"),level=4)
18656  */
18657  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setupFieldStrides); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 857, __pyx_L1_error)
18658  __Pyx_GOTREF(__pyx_t_14);
18659  __pyx_t_7 = NULL;
18660  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
18661  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
18662  if (likely(__pyx_t_7)) {
18663  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
18664  __Pyx_INCREF(__pyx_t_7);
18665  __Pyx_INCREF(function);
18666  __Pyx_DECREF_SET(__pyx_t_14, function);
18667  }
18668  }
18669  if (__pyx_t_7) {
18670  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
18671  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18672  } else {
18673  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
18674  }
18675  __Pyx_GOTREF(__pyx_t_1);
18676  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18677  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18678 
18679  /* "ADR.pyx":859
18680  * self.setupFieldStrides()
18681  *
18682  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18683  * if numericalFluxType != None:
18684  * if options == None or options.periodicDirichletConditions == None:
18685  */
18686  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
18687  __Pyx_GOTREF(__pyx_t_1);
18688  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 859, __pyx_L1_error)
18689  __Pyx_GOTREF(__pyx_t_14);
18690  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error)
18691  __Pyx_GOTREF(__pyx_t_7);
18692  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18693  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 859, __pyx_L1_error)
18694  __Pyx_GOTREF(__pyx_t_14);
18695  __Pyx_GIVEREF(__pyx_t_7);
18696  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7);
18697  __pyx_t_7 = 0;
18698  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error)
18699  __Pyx_GOTREF(__pyx_t_7);
18700  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
18701  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 859, __pyx_L1_error)
18702  __Pyx_GOTREF(__pyx_t_8);
18703  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18704  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
18705  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18706  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18707 
18708  /* "ADR.pyx":860
18709  *
18710  * log(memory("stride+offset","OneLevelTransport"),level=4)
18711  * if numericalFluxType != None: # <<<<<<<<<<<<<<
18712  * if options == None or options.periodicDirichletConditions == None:
18713  * self.numericalFlux = numericalFluxType(self,
18714  */
18715  __pyx_t_8 = PyObject_RichCompare(__pyx_v_numericalFluxType, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error)
18716  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 860, __pyx_L1_error)
18717  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18718  if (__pyx_t_15) {
18719 
18720  /* "ADR.pyx":861
18721  * log(memory("stride+offset","OneLevelTransport"),level=4)
18722  * if numericalFluxType != None:
18723  * if options == None or options.periodicDirichletConditions == None: # <<<<<<<<<<<<<<
18724  * self.numericalFlux = numericalFluxType(self,
18725  * dofBoundaryConditionsSetterDict,
18726  */
18727  __pyx_t_8 = PyObject_RichCompare(__pyx_v_options, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error)
18728  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
18729  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18730  if (!__pyx_t_3) {
18731  } else {
18732  __pyx_t_15 = __pyx_t_3;
18733  goto __pyx_L111_bool_binop_done;
18734  }
18735  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error)
18736  __Pyx_GOTREF(__pyx_t_8);
18737  __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 861, __pyx_L1_error)
18738  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18739  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
18740  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18741  __pyx_t_15 = __pyx_t_3;
18742  __pyx_L111_bool_binop_done:;
18743  if (__pyx_t_15) {
18744 
18745  /* "ADR.pyx":865
18746  * dofBoundaryConditionsSetterDict,
18747  * advectiveFluxBoundaryConditionsSetterDict,
18748  * diffusiveFluxBoundaryConditionsSetterDictDict) # <<<<<<<<<<<<<<
18749  * else:
18750  * self.numericalFlux = numericalFluxType(self,
18751  */
18752  __Pyx_INCREF(__pyx_v_numericalFluxType);
18753  __pyx_t_8 = __pyx_v_numericalFluxType; __pyx_t_14 = NULL;
18754  __pyx_t_13 = 0;
18755  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
18756  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
18757  if (likely(__pyx_t_14)) {
18758  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18759  __Pyx_INCREF(__pyx_t_14);
18760  __Pyx_INCREF(function);
18761  __Pyx_DECREF_SET(__pyx_t_8, function);
18762  __pyx_t_13 = 1;
18763  }
18764  }
18765  #if CYTHON_FAST_PYCALL
18766  if (PyFunction_Check(__pyx_t_8)) {
18767  PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18768  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 862, __pyx_L1_error)
18769  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18770  __Pyx_GOTREF(__pyx_t_7);
18771  } else
18772  #endif
18773  #if CYTHON_FAST_PYCCALL
18774  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
18775  PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18776  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 862, __pyx_L1_error)
18777  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18778  __Pyx_GOTREF(__pyx_t_7);
18779  } else
18780  #endif
18781  {
18782  __pyx_t_1 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
18783  __Pyx_GOTREF(__pyx_t_1);
18784  if (__pyx_t_14) {
18785  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __pyx_t_14 = NULL;
18786  }
18787  __Pyx_INCREF(__pyx_v_self);
18788  __Pyx_GIVEREF(__pyx_v_self);
18789  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_v_self);
18790  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18791  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18792  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_v_dofBoundaryConditionsSetterDict);
18793  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18794  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18795  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_13, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18796  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18797  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18798  PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_13, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18799  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 862, __pyx_L1_error)
18800  __Pyx_GOTREF(__pyx_t_7);
18801  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18802  }
18803  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18804 
18805  /* "ADR.pyx":862
18806  * if numericalFluxType != None:
18807  * if options == None or options.periodicDirichletConditions == None:
18808  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18809  * dofBoundaryConditionsSetterDict,
18810  * advectiveFluxBoundaryConditionsSetterDict,
18811  */
18812  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_7) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
18813  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18814 
18815  /* "ADR.pyx":861
18816  * log(memory("stride+offset","OneLevelTransport"),level=4)
18817  * if numericalFluxType != None:
18818  * if options == None or options.periodicDirichletConditions == None: # <<<<<<<<<<<<<<
18819  * self.numericalFlux = numericalFluxType(self,
18820  * dofBoundaryConditionsSetterDict,
18821  */
18822  goto __pyx_L110;
18823  }
18824 
18825  /* "ADR.pyx":867
18826  * diffusiveFluxBoundaryConditionsSetterDictDict)
18827  * else:
18828  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18829  * dofBoundaryConditionsSetterDict,
18830  * advectiveFluxBoundaryConditionsSetterDict,
18831  */
18832  /*else*/ {
18833 
18834  /* "ADR.pyx":871
18835  * advectiveFluxBoundaryConditionsSetterDict,
18836  * diffusiveFluxBoundaryConditionsSetterDictDict,
18837  * options.periodicDirichletConditions) # <<<<<<<<<<<<<<
18838  * else:
18839  * self.numericalFlux = None
18840  */
18841  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L1_error)
18842  __Pyx_GOTREF(__pyx_t_8);
18843  __Pyx_INCREF(__pyx_v_numericalFluxType);
18844  __pyx_t_1 = __pyx_v_numericalFluxType; __pyx_t_14 = NULL;
18845  __pyx_t_13 = 0;
18846  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
18847  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
18848  if (likely(__pyx_t_14)) {
18849  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
18850  __Pyx_INCREF(__pyx_t_14);
18851  __Pyx_INCREF(function);
18852  __Pyx_DECREF_SET(__pyx_t_1, function);
18853  __pyx_t_13 = 1;
18854  }
18855  }
18856  #if CYTHON_FAST_PYCALL
18857  if (PyFunction_Check(__pyx_t_1)) {
18858  PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_8};
18859  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 5+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 867, __pyx_L1_error)
18860  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18861  __Pyx_GOTREF(__pyx_t_7);
18862  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18863  } else
18864  #endif
18865  #if CYTHON_FAST_PYCCALL
18866  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
18867  PyObject *__pyx_temp[6] = {__pyx_t_14, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_8};
18868  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 5+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 867, __pyx_L1_error)
18869  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
18870  __Pyx_GOTREF(__pyx_t_7);
18871  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18872  } else
18873  #endif
18874  {
18875  __pyx_t_6 = PyTuple_New(5+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
18876  __Pyx_GOTREF(__pyx_t_6);
18877  if (__pyx_t_14) {
18878  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14); __pyx_t_14 = NULL;
18879  }
18880  __Pyx_INCREF(__pyx_v_self);
18881  __Pyx_GIVEREF(__pyx_v_self);
18882  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_v_self);
18883  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18884  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18885  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_v_dofBoundaryConditionsSetterDict);
18886  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18887  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18888  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_13, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18889  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18890  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18891  PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_13, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18892  __Pyx_GIVEREF(__pyx_t_8);
18893  PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_13, __pyx_t_8);
18894  __pyx_t_8 = 0;
18895  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 867, __pyx_L1_error)
18896  __Pyx_GOTREF(__pyx_t_7);
18897  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18898  }
18899  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18900 
18901  /* "ADR.pyx":867
18902  * diffusiveFluxBoundaryConditionsSetterDictDict)
18903  * else:
18904  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18905  * dofBoundaryConditionsSetterDict,
18906  * advectiveFluxBoundaryConditionsSetterDict,
18907  */
18908  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_7) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
18909  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18910  }
18911  __pyx_L110:;
18912 
18913  /* "ADR.pyx":860
18914  *
18915  * log(memory("stride+offset","OneLevelTransport"),level=4)
18916  * if numericalFluxType != None: # <<<<<<<<<<<<<<
18917  * if options == None or options.periodicDirichletConditions == None:
18918  * self.numericalFlux = numericalFluxType(self,
18919  */
18920  goto __pyx_L109;
18921  }
18922 
18923  /* "ADR.pyx":873
18924  * options.periodicDirichletConditions)
18925  * else:
18926  * self.numericalFlux = None # <<<<<<<<<<<<<<
18927  * #set penalty terms
18928  * #cek todo move into numerical flux initialization
18929  */
18930  /*else*/ {
18931  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, Py_None) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
18932  }
18933  __pyx_L109:;
18934 
18935  /* "ADR.pyx":876
18936  * #set penalty terms
18937  * #cek todo move into numerical flux initialization
18938  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
18939  * for ebN in range(self.mesh.nElementBoundaries_global):
18940  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18941  */
18942  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 876, __pyx_L1_error)
18943  __Pyx_GOTREF(__pyx_t_7);
18944  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
18945  __Pyx_GOTREF(__pyx_t_1);
18946  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18947  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 876, __pyx_L1_error)
18948  __Pyx_GOTREF(__pyx_t_7);
18949  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18950  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 876, __pyx_L1_error)
18951  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18952  if (__pyx_t_15) {
18953 
18954  /* "ADR.pyx":877
18955  * #cek todo move into numerical flux initialization
18956  * if self.ebq_global.has_key('penalty'):
18957  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
18958  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18959  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18960  */
18961  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
18962  __Pyx_GOTREF(__pyx_t_7);
18963  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18964  __Pyx_GOTREF(__pyx_t_1);
18965  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18966  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
18967  __Pyx_GOTREF(__pyx_t_7);
18968  __Pyx_GIVEREF(__pyx_t_1);
18969  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
18970  __pyx_t_1 = 0;
18971  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18972  __Pyx_GOTREF(__pyx_t_1);
18973  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18974  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
18975  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
18976  __pyx_t_5 = NULL;
18977  } else {
18978  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
18979  __Pyx_GOTREF(__pyx_t_7);
18980  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error)
18981  }
18982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18983  for (;;) {
18984  if (likely(!__pyx_t_5)) {
18985  if (likely(PyList_CheckExact(__pyx_t_7))) {
18986  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
18987  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18988  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
18989  #else
18990  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18991  __Pyx_GOTREF(__pyx_t_1);
18992  #endif
18993  } else {
18994  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
18995  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18996  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
18997  #else
18998  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
18999  __Pyx_GOTREF(__pyx_t_1);
19000  #endif
19001  }
19002  } else {
19003  __pyx_t_1 = __pyx_t_5(__pyx_t_7);
19004  if (unlikely(!__pyx_t_1)) {
19005  PyObject* exc_type = PyErr_Occurred();
19006  if (exc_type) {
19007  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19008  else __PYX_ERR(0, 877, __pyx_L1_error)
19009  }
19010  break;
19011  }
19012  __Pyx_GOTREF(__pyx_t_1);
19013  }
19014  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_1);
19015  __pyx_t_1 = 0;
19016 
19017  /* "ADR.pyx":878
19018  * if self.ebq_global.has_key('penalty'):
19019  * for ebN in range(self.mesh.nElementBoundaries_global):
19020  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19021  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19022  * #penalty term
19023  */
19024  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
19025  __Pyx_GOTREF(__pyx_t_1);
19026  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
19027  __Pyx_GOTREF(__pyx_t_6);
19028  __Pyx_GIVEREF(__pyx_t_1);
19029  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
19030  __pyx_t_1 = 0;
19031  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
19032  __Pyx_GOTREF(__pyx_t_1);
19033  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19034  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
19035  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
19036  __pyx_t_10 = NULL;
19037  } else {
19038  __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)
19039  __Pyx_GOTREF(__pyx_t_6);
19040  __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 878, __pyx_L1_error)
19041  }
19042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19043  for (;;) {
19044  if (likely(!__pyx_t_10)) {
19045  if (likely(PyList_CheckExact(__pyx_t_6))) {
19046  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
19047  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19048  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
19049  #else
19050  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
19051  __Pyx_GOTREF(__pyx_t_1);
19052  #endif
19053  } else {
19054  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
19055  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19056  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
19057  #else
19058  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
19059  __Pyx_GOTREF(__pyx_t_1);
19060  #endif
19061  }
19062  } else {
19063  __pyx_t_1 = __pyx_t_10(__pyx_t_6);
19064  if (unlikely(!__pyx_t_1)) {
19065  PyObject* exc_type = PyErr_Occurred();
19066  if (exc_type) {
19067  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19068  else __PYX_ERR(0, 878, __pyx_L1_error)
19069  }
19070  break;
19071  }
19072  __Pyx_GOTREF(__pyx_t_1);
19073  }
19074  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
19075  __pyx_t_1 = 0;
19076 
19077  /* "ADR.pyx":879
19078  * for ebN in range(self.mesh.nElementBoundaries_global):
19079  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19080  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power) # <<<<<<<<<<<<<<
19081  * #penalty term
19082  * #cek move to Numerical flux initialization
19083  */
19084  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
19085  __Pyx_GOTREF(__pyx_t_1);
19086  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
19087  __Pyx_GOTREF(__pyx_t_8);
19088  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19089  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
19090  __Pyx_GOTREF(__pyx_t_1);
19091  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 879, __pyx_L1_error)
19092  __Pyx_GOTREF(__pyx_t_14);
19093  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19094  __pyx_t_1 = PyObject_GetItem(__pyx_t_14, __pyx_v_ebN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
19095  __Pyx_GOTREF(__pyx_t_1);
19096  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19097  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 879, __pyx_L1_error)
19098  __Pyx_GOTREF(__pyx_t_14);
19099  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
19100  __Pyx_GOTREF(__pyx_t_2);
19101  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19102  __pyx_t_14 = PyNumber_Power(__pyx_t_1, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 879, __pyx_L1_error)
19103  __Pyx_GOTREF(__pyx_t_14);
19104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19105  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19106  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
19107  __Pyx_GOTREF(__pyx_t_2);
19108  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19109  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19110  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 879, __pyx_L1_error)
19111  __Pyx_GOTREF(__pyx_t_14);
19112  __pyx_t_8 = PyObject_GetItem(__pyx_t_14, __pyx_n_s_penalty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error)
19113  __Pyx_GOTREF(__pyx_t_8);
19114  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19115  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 879, __pyx_L1_error)
19116  __Pyx_GOTREF(__pyx_t_14);
19117  __Pyx_INCREF(__pyx_v_ebN);
19118  __Pyx_GIVEREF(__pyx_v_ebN);
19119  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_ebN);
19120  __Pyx_INCREF(__pyx_v_k);
19121  __Pyx_GIVEREF(__pyx_v_k);
19122  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_k);
19123  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 879, __pyx_L1_error)
19124  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19125  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19126  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19127 
19128  /* "ADR.pyx":878
19129  * if self.ebq_global.has_key('penalty'):
19130  * for ebN in range(self.mesh.nElementBoundaries_global):
19131  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19132  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19133  * #penalty term
19134  */
19135  }
19136  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19137 
19138  /* "ADR.pyx":877
19139  * #cek todo move into numerical flux initialization
19140  * if self.ebq_global.has_key('penalty'):
19141  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
19142  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19143  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
19144  */
19145  }
19146  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19147 
19148  /* "ADR.pyx":876
19149  * #set penalty terms
19150  * #cek todo move into numerical flux initialization
19151  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
19152  * for ebN in range(self.mesh.nElementBoundaries_global):
19153  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19154  */
19155  }
19156 
19157  /* "ADR.pyx":882
19158  * #penalty term
19159  * #cek move to Numerical flux initialization
19160  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
19161  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19162  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19163  */
19164  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
19165  __Pyx_GOTREF(__pyx_t_7);
19166  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
19167  __Pyx_GOTREF(__pyx_t_6);
19168  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19169  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 882, __pyx_L1_error)
19170  __Pyx_GOTREF(__pyx_t_7);
19171  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19172  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 882, __pyx_L1_error)
19173  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19174  if (__pyx_t_15) {
19175 
19176  /* "ADR.pyx":883
19177  * #cek move to Numerical flux initialization
19178  * if self.ebqe.has_key('penalty'):
19179  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
19180  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19181  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19182  */
19183  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L1_error)
19184  __Pyx_GOTREF(__pyx_t_7);
19185  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19186  __Pyx_GOTREF(__pyx_t_6);
19187  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19188  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L1_error)
19189  __Pyx_GOTREF(__pyx_t_7);
19190  __Pyx_GIVEREF(__pyx_t_6);
19191  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
19192  __pyx_t_6 = 0;
19193  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19194  __Pyx_GOTREF(__pyx_t_6);
19195  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19196  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
19197  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
19198  __pyx_t_5 = NULL;
19199  } else {
19200  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L1_error)
19201  __Pyx_GOTREF(__pyx_t_7);
19202  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 883, __pyx_L1_error)
19203  }
19204  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19205  for (;;) {
19206  if (likely(!__pyx_t_5)) {
19207  if (likely(PyList_CheckExact(__pyx_t_7))) {
19208  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
19209  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19210  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
19211  #else
19212  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19213  __Pyx_GOTREF(__pyx_t_6);
19214  #endif
19215  } else {
19216  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
19217  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19218  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
19219  #else
19220  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error)
19221  __Pyx_GOTREF(__pyx_t_6);
19222  #endif
19223  }
19224  } else {
19225  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
19226  if (unlikely(!__pyx_t_6)) {
19227  PyObject* exc_type = PyErr_Occurred();
19228  if (exc_type) {
19229  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19230  else __PYX_ERR(0, 883, __pyx_L1_error)
19231  }
19232  break;
19233  }
19234  __Pyx_GOTREF(__pyx_t_6);
19235  }
19236  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_6);
19237  __pyx_t_6 = 0;
19238 
19239  /* "ADR.pyx":884
19240  * if self.ebqe.has_key('penalty'):
19241  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19242  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
19243  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19244  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19245  */
19246  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error)
19247  __Pyx_GOTREF(__pyx_t_6);
19248  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error)
19249  __Pyx_GOTREF(__pyx_t_2);
19250  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19251  __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_ebNE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error)
19252  __Pyx_GOTREF(__pyx_t_6);
19253  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19254  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_6);
19255  __pyx_t_6 = 0;
19256 
19257  /* "ADR.pyx":885
19258  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19259  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19260  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19261  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19262  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19263  */
19264  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19265  __Pyx_GOTREF(__pyx_t_6);
19266  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
19267  __Pyx_GOTREF(__pyx_t_2);
19268  __Pyx_GIVEREF(__pyx_t_6);
19269  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
19270  __pyx_t_6 = 0;
19271  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19272  __Pyx_GOTREF(__pyx_t_6);
19273  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19274  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
19275  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
19276  __pyx_t_10 = NULL;
19277  } else {
19278  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
19279  __Pyx_GOTREF(__pyx_t_2);
19280  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 885, __pyx_L1_error)
19281  }
19282  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19283  for (;;) {
19284  if (likely(!__pyx_t_10)) {
19285  if (likely(PyList_CheckExact(__pyx_t_2))) {
19286  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
19287  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19288  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
19289  #else
19290  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19291  __Pyx_GOTREF(__pyx_t_6);
19292  #endif
19293  } else {
19294  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
19295  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19296  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
19297  #else
19298  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
19299  __Pyx_GOTREF(__pyx_t_6);
19300  #endif
19301  }
19302  } else {
19303  __pyx_t_6 = __pyx_t_10(__pyx_t_2);
19304  if (unlikely(!__pyx_t_6)) {
19305  PyObject* exc_type = PyErr_Occurred();
19306  if (exc_type) {
19307  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
19308  else __PYX_ERR(0, 885, __pyx_L1_error)
19309  }
19310  break;
19311  }
19312  __Pyx_GOTREF(__pyx_t_6);
19313  }
19314  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
19315  __pyx_t_6 = 0;
19316 
19317  /* "ADR.pyx":886
19318  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19319  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19320  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power # <<<<<<<<<<<<<<
19321  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19322  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19323  */
19324  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19325  __Pyx_GOTREF(__pyx_t_6);
19326  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 886, __pyx_L1_error)
19327  __Pyx_GOTREF(__pyx_t_14);
19328  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19329  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19330  __Pyx_GOTREF(__pyx_t_6);
19331  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19332  __Pyx_GOTREF(__pyx_t_8);
19333  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19334  __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_v_ebN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
19335  __Pyx_GOTREF(__pyx_t_6);
19336  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19337  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19338  __Pyx_GOTREF(__pyx_t_8);
19339  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
19340  __Pyx_GOTREF(__pyx_t_1);
19341  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19342  __pyx_t_8 = PyNumber_Power(__pyx_t_6, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19343  __Pyx_GOTREF(__pyx_t_8);
19344  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19345  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19346  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
19347  __Pyx_GOTREF(__pyx_t_1);
19348  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19349  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19350  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19351  __Pyx_GOTREF(__pyx_t_8);
19352  __pyx_t_14 = PyObject_GetItem(__pyx_t_8, __pyx_n_s_penalty); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 886, __pyx_L1_error)
19353  __Pyx_GOTREF(__pyx_t_14);
19354  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19355  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
19356  __Pyx_GOTREF(__pyx_t_8);
19357  __Pyx_INCREF(__pyx_v_ebNE);
19358  __Pyx_GIVEREF(__pyx_v_ebNE);
19359  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ebNE);
19360  __Pyx_INCREF(__pyx_v_k);
19361  __Pyx_GIVEREF(__pyx_v_k);
19362  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_k);
19363  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_8, __pyx_t_1) < 0)) __PYX_ERR(0, 886, __pyx_L1_error)
19364  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19365  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19366  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19367 
19368  /* "ADR.pyx":885
19369  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19370  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19371  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19372  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19373  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19374  */
19375  }
19376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19377 
19378  /* "ADR.pyx":883
19379  * #cek move to Numerical flux initialization
19380  * if self.ebqe.has_key('penalty'):
19381  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
19382  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19383  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19384  */
19385  }
19386  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19387 
19388  /* "ADR.pyx":882
19389  * #penalty term
19390  * #cek move to Numerical flux initialization
19391  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
19392  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19393  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19394  */
19395  }
19396 
19397  /* "ADR.pyx":887
19398  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19399  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19400  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19401  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19402  * #use post processing tools to get conservative fluxes, None by default
19403  */
19404  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error)
19405  __Pyx_GOTREF(__pyx_t_7);
19406  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error)
19407  __Pyx_GOTREF(__pyx_t_2);
19408  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
19409  __Pyx_GOTREF(__pyx_t_1);
19410  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19411  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error)
19412  __Pyx_GOTREF(__pyx_t_2);
19413  __Pyx_GIVEREF(__pyx_t_1);
19414  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
19415  __pyx_t_1 = 0;
19416  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
19417  __Pyx_GOTREF(__pyx_t_1);
19418  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 887, __pyx_L1_error)
19419  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
19420  __Pyx_GOTREF(__pyx_t_8);
19421  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19423  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19424  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19425 
19426  /* "ADR.pyx":888
19427  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19428  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19429  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray # <<<<<<<<<<<<<<
19430  * #use post processing tools to get conservative fluxes, None by default
19431  * from proteus import PostProcessingTools
19432  */
19433  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error)
19434  __Pyx_GOTREF(__pyx_t_8);
19435  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
19436  __Pyx_GOTREF(__pyx_t_1);
19437  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19438  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementEffectiveDiametersArray, __pyx_t_1) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
19439  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19440 
19441  /* "ADR.pyx":890
19442  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19443  * #use post processing tools to get conservative fluxes, None by default
19444  * from proteus import PostProcessingTools # <<<<<<<<<<<<<<
19445  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19446  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19447  */
19448  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
19449  __Pyx_GOTREF(__pyx_t_1);
19450  __Pyx_INCREF(__pyx_n_s_PostProcessingTools);
19451  __Pyx_GIVEREF(__pyx_n_s_PostProcessingTools);
19452  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PostProcessingTools);
19453  __pyx_t_8 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_1, -1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error)
19454  __Pyx_GOTREF(__pyx_t_8);
19455  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19456  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_8, __pyx_n_s_PostProcessingTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
19457  __Pyx_GOTREF(__pyx_t_1);
19458  __Pyx_INCREF(__pyx_t_1);
19459  __pyx_v_PostProcessingTools = __pyx_t_1;
19460  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19461  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19462 
19463  /* "ADR.pyx":891
19464  * #use post processing tools to get conservative fluxes, None by default
19465  * from proteus import PostProcessingTools
19466  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self) # <<<<<<<<<<<<<<
19467  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19468  * #helper for writing out data storage
19469  */
19470  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_PostProcessingTools, __pyx_n_s_VelocityPostProcessingChooser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
19471  __Pyx_GOTREF(__pyx_t_1);
19472  __pyx_t_2 = NULL;
19473  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
19474  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
19475  if (likely(__pyx_t_2)) {
19476  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
19477  __Pyx_INCREF(__pyx_t_2);
19478  __Pyx_INCREF(function);
19479  __Pyx_DECREF_SET(__pyx_t_1, function);
19480  }
19481  }
19482  if (!__pyx_t_2) {
19483  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
19484  __Pyx_GOTREF(__pyx_t_8);
19485  } else {
19486  #if CYTHON_FAST_PYCALL
19487  if (PyFunction_Check(__pyx_t_1)) {
19488  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_self};
19489  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
19490  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19491  __Pyx_GOTREF(__pyx_t_8);
19492  } else
19493  #endif
19494  #if CYTHON_FAST_PYCCALL
19495  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
19496  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_self};
19497  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
19498  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19499  __Pyx_GOTREF(__pyx_t_8);
19500  } else
19501  #endif
19502  {
19503  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error)
19504  __Pyx_GOTREF(__pyx_t_7);
19505  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
19506  __Pyx_INCREF(__pyx_v_self);
19507  __Pyx_GIVEREF(__pyx_v_self);
19508  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self);
19509  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error)
19510  __Pyx_GOTREF(__pyx_t_8);
19511  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19512  }
19513  }
19514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19515  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocityPostProcessor, __pyx_t_8) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
19516  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19517 
19518  /* "ADR.pyx":892
19519  * from proteus import PostProcessingTools
19520  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19521  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19522  * #helper for writing out data storage
19523  * from proteus import Archiver
19524  */
19525  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
19526  __Pyx_GOTREF(__pyx_t_8);
19527  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_memory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
19528  __Pyx_GOTREF(__pyx_t_1);
19529  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L1_error)
19530  __Pyx_GOTREF(__pyx_t_7);
19531  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19532  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
19533  __Pyx_GOTREF(__pyx_t_1);
19534  __Pyx_GIVEREF(__pyx_t_7);
19535  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
19536  __pyx_t_7 = 0;
19537  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L1_error)
19538  __Pyx_GOTREF(__pyx_t_7);
19539  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
19540  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
19541  __Pyx_GOTREF(__pyx_t_2);
19542  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19543  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19544  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19545  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19546 
19547  /* "ADR.pyx":894
19548  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19549  * #helper for writing out data storage
19550  * from proteus import Archiver # <<<<<<<<<<<<<<
19551  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19552  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19553  */
19554  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
19555  __Pyx_GOTREF(__pyx_t_2);
19556  __Pyx_INCREF(__pyx_n_s_Archiver);
19557  __Pyx_GIVEREF(__pyx_n_s_Archiver);
19558  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Archiver);
19559  __pyx_t_7 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
19560  __Pyx_GOTREF(__pyx_t_7);
19561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19562  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_Archiver); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
19563  __Pyx_GOTREF(__pyx_t_2);
19564  __Pyx_INCREF(__pyx_t_2);
19565  __pyx_v_Archiver = __pyx_t_2;
19566  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19567  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19568 
19569  /* "ADR.pyx":895
19570  * #helper for writing out data storage
19571  * from proteus import Archiver
19572  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19573  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19574  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19575  */
19576  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
19577  __Pyx_GOTREF(__pyx_t_2);
19578  __pyx_t_1 = NULL;
19579  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19580  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
19581  if (likely(__pyx_t_1)) {
19582  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19583  __Pyx_INCREF(__pyx_t_1);
19584  __Pyx_INCREF(function);
19585  __Pyx_DECREF_SET(__pyx_t_2, function);
19586  }
19587  }
19588  if (__pyx_t_1) {
19589  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)
19590  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19591  } else {
19592  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)
19593  }
19594  __Pyx_GOTREF(__pyx_t_7);
19595  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19596  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureDictionaryWrite, __pyx_t_7) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
19597  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19598 
19599  /* "ADR.pyx":896
19600  * from proteus import Archiver
19601  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19602  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19603  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19604  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19605  */
19606  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
19607  __Pyx_GOTREF(__pyx_t_2);
19608  __pyx_t_1 = NULL;
19609  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19610  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
19611  if (likely(__pyx_t_1)) {
19612  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19613  __Pyx_INCREF(__pyx_t_1);
19614  __Pyx_INCREF(function);
19615  __Pyx_DECREF_SET(__pyx_t_2, function);
19616  }
19617  }
19618  if (__pyx_t_1) {
19619  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
19620  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19621  } else {
19622  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
19623  }
19624  __Pyx_GOTREF(__pyx_t_7);
19625  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19626  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureDiction, __pyx_t_7) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
19627  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19628 
19629  /* "ADR.pyx":897
19630  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19631  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19632  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19633  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19634  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19635  */
19636  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
19637  __Pyx_GOTREF(__pyx_t_2);
19638  __pyx_t_1 = NULL;
19639  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19640  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
19641  if (likely(__pyx_t_1)) {
19642  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19643  __Pyx_INCREF(__pyx_t_1);
19644  __Pyx_INCREF(function);
19645  __Pyx_DECREF_SET(__pyx_t_2, function);
19646  }
19647  }
19648  if (__pyx_t_1) {
19649  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error)
19650  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19651  } else {
19652  __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error)
19653  }
19654  __Pyx_GOTREF(__pyx_t_7);
19655  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19656  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_t_7) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
19657  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19658 
19659  /* "ADR.pyx":898
19660  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19661  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19662  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems(): # <<<<<<<<<<<<<<
19663  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19664  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19665  */
19666  __pyx_t_4 = 0;
19667  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error)
19668  __Pyx_GOTREF(__pyx_t_2);
19669  if (unlikely(__pyx_t_2 == Py_None)) {
19670  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
19671  __PYX_ERR(0, 898, __pyx_L1_error)
19672  }
19673  __pyx_t_1 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_iteritems, (&__pyx_t_9), (&__pyx_t_13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
19674  __Pyx_GOTREF(__pyx_t_1);
19675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19676  __Pyx_XDECREF(__pyx_t_7);
19677  __pyx_t_7 = __pyx_t_1;
19678  __pyx_t_1 = 0;
19679  while (1) {
19680  __pyx_t_17 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_9, &__pyx_t_4, &__pyx_t_1, &__pyx_t_2, NULL, __pyx_t_13);
19681  if (unlikely(__pyx_t_17 == 0)) break;
19682  if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 898, __pyx_L1_error)
19683  __Pyx_GOTREF(__pyx_t_1);
19684  __Pyx_GOTREF(__pyx_t_2);
19685  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
19686  __pyx_t_1 = 0;
19687  __Pyx_XDECREF_SET(__pyx_v_fbcObject, __pyx_t_2);
19688  __pyx_t_2 = 0;
19689 
19690  /* "ADR.pyx":899
19691  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19692  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19693  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i') # <<<<<<<<<<<<<<
19694  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19695  * if self.coefficients.advection.has_key(ci):
19696  */
19697  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
19698  __Pyx_GOTREF(__pyx_t_1);
19699  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19700  __Pyx_GOTREF(__pyx_t_8);
19701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19702  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
19703  __Pyx_GOTREF(__pyx_t_1);
19704  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 899, __pyx_L1_error)
19705  __Pyx_GOTREF(__pyx_t_14);
19706  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19707  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19708  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_advectiveFlux_bc);
19709  __Pyx_INCREF(__pyx_v_ci);
19710  __Pyx_GIVEREF(__pyx_v_ci);
19711  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ci);
19712  __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error)
19713  __Pyx_GOTREF(__pyx_t_6);
19714  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19715  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19716  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 899, __pyx_L1_error)
19717  __Pyx_GOTREF(__pyx_t_14);
19718  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19719  __pyx_t_6 = NULL;
19720  __pyx_t_17 = 0;
19721  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
19722  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
19723  if (likely(__pyx_t_6)) {
19724  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
19725  __Pyx_INCREF(__pyx_t_6);
19726  __Pyx_INCREF(function);
19727  __Pyx_DECREF_SET(__pyx_t_8, function);
19728  __pyx_t_17 = 1;
19729  }
19730  }
19731  #if CYTHON_FAST_PYCALL
19732  if (PyFunction_Check(__pyx_t_8)) {
19733  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_14, __pyx_n_s_i};
19734  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
19735  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19736  __Pyx_GOTREF(__pyx_t_2);
19737  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19738  } else
19739  #endif
19740  #if CYTHON_FAST_PYCCALL
19741  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
19742  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_14, __pyx_n_s_i};
19743  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
19744  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19745  __Pyx_GOTREF(__pyx_t_2);
19746  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19747  } else
19748  #endif
19749  {
19750  __pyx_t_1 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
19751  __Pyx_GOTREF(__pyx_t_1);
19752  if (__pyx_t_6) {
19753  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
19754  }
19755  __Pyx_GIVEREF(__pyx_t_14);
19756  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_17, __pyx_t_14);
19757  __Pyx_INCREF(__pyx_n_s_i);
19758  __Pyx_GIVEREF(__pyx_n_s_i);
19759  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_17, __pyx_n_s_i);
19760  __pyx_t_14 = 0;
19761  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
19762  __Pyx_GOTREF(__pyx_t_2);
19763  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19764  }
19765  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19766  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
19767  __Pyx_GOTREF(__pyx_t_8);
19768  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
19769  __Pyx_GOTREF(__pyx_t_1);
19770  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
19771  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
19772  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_advectiveFlux_bc_flag);
19773  __Pyx_INCREF(__pyx_v_ci);
19774  __Pyx_GIVEREF(__pyx_v_ci);
19775  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
19776  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(0, 899, __pyx_L1_error)
19777  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19778  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19780 
19781  /* "ADR.pyx":900
19782  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19783  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19784  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
19785  * if self.coefficients.advection.has_key(ci):
19786  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19787  */
19788  __pyx_t_11 = 0;
19789  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_advectiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
19790  __Pyx_GOTREF(__pyx_t_1);
19791  if (unlikely(__pyx_t_1 == Py_None)) {
19792  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
19793  __PYX_ERR(0, 900, __pyx_L1_error)
19794  }
19795  __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_1, 0, __pyx_n_s_iteritems, (&__pyx_t_18), (&__pyx_t_17)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error)
19796  __Pyx_GOTREF(__pyx_t_8);
19797  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19798  __Pyx_XDECREF(__pyx_t_2);
19799  __pyx_t_2 = __pyx_t_8;
19800  __pyx_t_8 = 0;
19801  while (1) {
19802  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_18, &__pyx_t_11, &__pyx_t_8, &__pyx_t_1, NULL, __pyx_t_17);
19803  if (unlikely(__pyx_t_19 == 0)) break;
19804  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 900, __pyx_L1_error)
19805  __Pyx_GOTREF(__pyx_t_8);
19806  __Pyx_GOTREF(__pyx_t_1);
19807  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_8);
19808  __pyx_t_8 = 0;
19809  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
19810  __pyx_t_1 = 0;
19811 
19812  /* "ADR.pyx":901
19813  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19814  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19815  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
19816  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19817  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19818  */
19819  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19820  __Pyx_GOTREF(__pyx_t_8);
19821  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_advection); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 901, __pyx_L1_error)
19822  __Pyx_GOTREF(__pyx_t_14);
19823  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19824  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error)
19825  __Pyx_GOTREF(__pyx_t_8);
19826  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19827  __pyx_t_14 = NULL;
19828  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
19829  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
19830  if (likely(__pyx_t_14)) {
19831  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
19832  __Pyx_INCREF(__pyx_t_14);
19833  __Pyx_INCREF(function);
19834  __Pyx_DECREF_SET(__pyx_t_8, function);
19835  }
19836  }
19837  if (!__pyx_t_14) {
19838  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
19839  __Pyx_GOTREF(__pyx_t_1);
19840  } else {
19841  #if CYTHON_FAST_PYCALL
19842  if (PyFunction_Check(__pyx_t_8)) {
19843  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_ci};
19844  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
19845  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
19846  __Pyx_GOTREF(__pyx_t_1);
19847  } else
19848  #endif
19849  #if CYTHON_FAST_PYCCALL
19850  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
19851  PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_ci};
19852  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
19853  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
19854  __Pyx_GOTREF(__pyx_t_1);
19855  } else
19856  #endif
19857  {
19858  __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error)
19859  __Pyx_GOTREF(__pyx_t_6);
19860  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14); __pyx_t_14 = NULL;
19861  __Pyx_INCREF(__pyx_v_ci);
19862  __Pyx_GIVEREF(__pyx_v_ci);
19863  PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ci);
19864  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
19865  __Pyx_GOTREF(__pyx_t_1);
19866  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19867  }
19868  }
19869  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19870  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 901, __pyx_L1_error)
19871  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19872  if (__pyx_t_15) {
19873 
19874  /* "ADR.pyx":902
19875  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19876  * if self.coefficients.advection.has_key(ci):
19877  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
19878  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19879  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19880  */
19881  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error)
19882  __Pyx_GOTREF(__pyx_t_8);
19883  __pyx_t_6 = PyObject_GetItem(__pyx_t_8, __pyx_n_s_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19884  __Pyx_GOTREF(__pyx_t_6);
19885  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19886  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error)
19887  __Pyx_GOTREF(__pyx_t_8);
19888  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 902, __pyx_L1_error)
19889  __Pyx_GOTREF(__pyx_t_14);
19890  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 902, __pyx_L1_error)
19891  __Pyx_GOTREF(__pyx_t_20);
19892  __Pyx_GIVEREF(__pyx_t_8);
19893  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_8);
19894  __Pyx_GIVEREF(__pyx_t_14);
19895  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_14);
19896  __pyx_t_8 = 0;
19897  __pyx_t_14 = 0;
19898  __pyx_t_14 = PyObject_GetItem(__pyx_t_6, __pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 902, __pyx_L1_error)
19899  __Pyx_GOTREF(__pyx_t_14);
19900  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19901  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
19902  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 902, __pyx_L1_error)
19903  __Pyx_GOTREF(__pyx_t_20);
19904  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19905  __Pyx_GOTREF(__pyx_t_6);
19906  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
19907  __Pyx_INCREF(__pyx_v_g);
19908  __pyx_t_20 = __pyx_v_g; __pyx_t_8 = NULL;
19909  __pyx_t_19 = 0;
19910  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_20))) {
19911  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_20);
19912  if (likely(__pyx_t_8)) {
19913  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
19914  __Pyx_INCREF(__pyx_t_8);
19915  __Pyx_INCREF(function);
19916  __Pyx_DECREF_SET(__pyx_t_20, function);
19917  __pyx_t_19 = 1;
19918  }
19919  }
19920  #if CYTHON_FAST_PYCALL
19921  if (PyFunction_Check(__pyx_t_20)) {
19922  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_14, __pyx_t_6};
19923  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
19924  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
19925  __Pyx_GOTREF(__pyx_t_1);
19926  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19927  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19928  } else
19929  #endif
19930  #if CYTHON_FAST_PYCCALL
19931  if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
19932  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_14, __pyx_t_6};
19933  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
19934  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
19935  __Pyx_GOTREF(__pyx_t_1);
19936  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19937  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19938  } else
19939  #endif
19940  {
19941  __pyx_t_21 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19942  __Pyx_GOTREF(__pyx_t_21);
19943  if (__pyx_t_8) {
19944  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_8); __pyx_t_8 = NULL;
19945  }
19946  __Pyx_GIVEREF(__pyx_t_14);
19947  PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_19, __pyx_t_14);
19948  __Pyx_GIVEREF(__pyx_t_6);
19949  PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_19, __pyx_t_6);
19950  __pyx_t_14 = 0;
19951  __pyx_t_6 = 0;
19952  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
19953  __Pyx_GOTREF(__pyx_t_1);
19954  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19955  }
19956  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
19957  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 902, __pyx_L1_error)
19958  __Pyx_GOTREF(__pyx_t_20);
19959  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19960  __Pyx_GOTREF(__pyx_t_21);
19961  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19962  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19963  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_n_s_advectiveFlux_bc);
19964  __Pyx_INCREF(__pyx_v_ci);
19965  __Pyx_GIVEREF(__pyx_v_ci);
19966  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_v_ci);
19967  __pyx_t_6 = PyObject_GetItem(__pyx_t_20, __pyx_t_21); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
19968  __Pyx_GOTREF(__pyx_t_6);
19969  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
19970  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19971  __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 902, __pyx_L1_error)
19972  __Pyx_GOTREF(__pyx_t_21);
19973  __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 902, __pyx_L1_error)
19974  __Pyx_GOTREF(__pyx_t_20);
19975  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 902, __pyx_L1_error)
19976  __Pyx_GOTREF(__pyx_t_14);
19977  __Pyx_GIVEREF(__pyx_t_21);
19978  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_21);
19979  __Pyx_GIVEREF(__pyx_t_20);
19980  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_20);
19981  __pyx_t_21 = 0;
19982  __pyx_t_20 = 0;
19983  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_14, __pyx_t_1) < 0)) __PYX_ERR(0, 902, __pyx_L1_error)
19984  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19985  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19986  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19987 
19988  /* "ADR.pyx":903
19989  * if self.coefficients.advection.has_key(ci):
19990  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19991  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
19992  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19993  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19994  */
19995  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
19996  __Pyx_GOTREF(__pyx_t_1);
19997  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 903, __pyx_L1_error)
19998  __Pyx_GOTREF(__pyx_t_14);
19999  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
20000  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
20001  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_advectiveFlux_bc_flag);
20002  __Pyx_INCREF(__pyx_v_ci);
20003  __Pyx_GIVEREF(__pyx_v_ci);
20004  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ci);
20005  __pyx_t_6 = PyObject_GetItem(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error)
20006  __Pyx_GOTREF(__pyx_t_6);
20007  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20008  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20009  __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 903, __pyx_L1_error)
20010  __Pyx_GOTREF(__pyx_t_14);
20011  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
20012  __Pyx_GOTREF(__pyx_t_1);
20013  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 903, __pyx_L1_error)
20014  __Pyx_GOTREF(__pyx_t_20);
20015  __Pyx_GIVEREF(__pyx_t_14);
20016  PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_14);
20017  __Pyx_GIVEREF(__pyx_t_1);
20018  PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_1);
20019  __pyx_t_14 = 0;
20020  __pyx_t_1 = 0;
20021  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_20, __pyx_int_1) < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
20022  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20023  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20024 
20025  /* "ADR.pyx":901
20026  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
20027  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
20028  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
20029  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20030  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20031  */
20032  }
20033  }
20034  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20035 
20036  /* "ADR.pyx":904
20037  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20038  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20039  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems(): # <<<<<<<<<<<<<<
20040  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20041  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20042  */
20043  __pyx_t_18 = 0;
20044  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_diffusiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 904, __pyx_L1_error)
20045  __Pyx_GOTREF(__pyx_t_20);
20046  if (unlikely(__pyx_t_20 == Py_None)) {
20047  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
20048  __PYX_ERR(0, 904, __pyx_L1_error)
20049  }
20050  __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_20, 0, __pyx_n_s_iteritems, (&__pyx_t_11), (&__pyx_t_17)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
20051  __Pyx_GOTREF(__pyx_t_6);
20052  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20053  __Pyx_XDECREF(__pyx_t_2);
20054  __pyx_t_2 = __pyx_t_6;
20055  __pyx_t_6 = 0;
20056  while (1) {
20057  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_11, &__pyx_t_18, &__pyx_t_6, &__pyx_t_20, NULL, __pyx_t_17);
20058  if (unlikely(__pyx_t_19 == 0)) break;
20059  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 904, __pyx_L1_error)
20060  __Pyx_GOTREF(__pyx_t_6);
20061  __Pyx_GOTREF(__pyx_t_20);
20062  __Pyx_XDECREF_SET(__pyx_v_ck, __pyx_t_6);
20063  __pyx_t_6 = 0;
20064  __Pyx_XDECREF_SET(__pyx_v_diffusiveFluxBoundaryConditionsDict, __pyx_t_20);
20065  __pyx_t_20 = 0;
20066 
20067  /* "ADR.pyx":905
20068  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
20069  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
20070  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i') # <<<<<<<<<<<<<<
20071  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20072  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20073  */
20074  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20075  __Pyx_GOTREF(__pyx_t_6);
20076  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
20077  __Pyx_GOTREF(__pyx_t_1);
20078  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20079  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20080  __Pyx_GOTREF(__pyx_t_6);
20081  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 905, __pyx_L1_error)
20082  __Pyx_GOTREF(__pyx_t_14);
20083  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
20084  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
20085  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_n_s_diffusiveFlux_bc);
20086  __Pyx_INCREF(__pyx_v_ck);
20087  __Pyx_GIVEREF(__pyx_v_ck);
20088  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_ck);
20089  __Pyx_INCREF(__pyx_v_ci);
20090  __Pyx_GIVEREF(__pyx_v_ci);
20091  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_ci);
20092  __pyx_t_21 = PyObject_GetItem(__pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 905, __pyx_L1_error)
20093  __Pyx_GOTREF(__pyx_t_21);
20094  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20095  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20096  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 905, __pyx_L1_error)
20097  __Pyx_GOTREF(__pyx_t_14);
20098  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20099  __pyx_t_21 = NULL;
20100  __pyx_t_19 = 0;
20101  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20102  __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_1);
20103  if (likely(__pyx_t_21)) {
20104  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20105  __Pyx_INCREF(__pyx_t_21);
20106  __Pyx_INCREF(function);
20107  __Pyx_DECREF_SET(__pyx_t_1, function);
20108  __pyx_t_19 = 1;
20109  }
20110  }
20111  #if CYTHON_FAST_PYCALL
20112  if (PyFunction_Check(__pyx_t_1)) {
20113  PyObject *__pyx_temp[3] = {__pyx_t_21, __pyx_t_14, __pyx_n_s_i};
20114  __pyx_t_20 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 905, __pyx_L1_error)
20115  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
20116  __Pyx_GOTREF(__pyx_t_20);
20117  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20118  } else
20119  #endif
20120  #if CYTHON_FAST_PYCCALL
20121  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
20122  PyObject *__pyx_temp[3] = {__pyx_t_21, __pyx_t_14, __pyx_n_s_i};
20123  __pyx_t_20 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 905, __pyx_L1_error)
20124  __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
20125  __Pyx_GOTREF(__pyx_t_20);
20126  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20127  } else
20128  #endif
20129  {
20130  __pyx_t_6 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20131  __Pyx_GOTREF(__pyx_t_6);
20132  if (__pyx_t_21) {
20133  __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_21); __pyx_t_21 = NULL;
20134  }
20135  __Pyx_GIVEREF(__pyx_t_14);
20136  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_19, __pyx_t_14);
20137  __Pyx_INCREF(__pyx_n_s_i);
20138  __Pyx_GIVEREF(__pyx_n_s_i);
20139  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_19, __pyx_n_s_i);
20140  __pyx_t_14 = 0;
20141  __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 905, __pyx_L1_error)
20142  __Pyx_GOTREF(__pyx_t_20);
20143  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20144  }
20145  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20146  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
20147  __Pyx_GOTREF(__pyx_t_1);
20148  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
20149  __Pyx_GOTREF(__pyx_t_6);
20150  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
20151  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
20152  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_diffusiveFlux_bc_flag);
20153  __Pyx_INCREF(__pyx_v_ck);
20154  __Pyx_GIVEREF(__pyx_v_ck);
20155  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ck);
20156  __Pyx_INCREF(__pyx_v_ci);
20157  __Pyx_GIVEREF(__pyx_v_ci);
20158  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
20159  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_20) < 0)) __PYX_ERR(0, 905, __pyx_L1_error)
20160  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20161  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20162  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20163 
20164  /* "ADR.pyx":906
20165  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
20166  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20167  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
20168  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20169  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20170  */
20171  __pyx_t_22 = 0;
20172  if (unlikely(__pyx_v_diffusiveFluxBoundaryConditionsDict == Py_None)) {
20173  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
20174  __PYX_ERR(0, 906, __pyx_L1_error)
20175  }
20176  __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_diffusiveFluxBoundaryConditionsDict, 0, __pyx_n_s_iteritems, (&__pyx_t_23), (&__pyx_t_19)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
20177  __Pyx_GOTREF(__pyx_t_6);
20178  __Pyx_XDECREF(__pyx_t_20);
20179  __pyx_t_20 = __pyx_t_6;
20180  __pyx_t_6 = 0;
20181  while (1) {
20182  __pyx_t_24 = __Pyx_dict_iter_next(__pyx_t_20, __pyx_t_23, &__pyx_t_22, &__pyx_t_6, &__pyx_t_1, NULL, __pyx_t_19);
20183  if (unlikely(__pyx_t_24 == 0)) break;
20184  if (unlikely(__pyx_t_24 == -1)) __PYX_ERR(0, 906, __pyx_L1_error)
20185  __Pyx_GOTREF(__pyx_t_6);
20186  __Pyx_GOTREF(__pyx_t_1);
20187  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6);
20188  __pyx_t_6 = 0;
20189  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
20190  __pyx_t_1 = 0;
20191 
20192  /* "ADR.pyx":907
20193  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
20194  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20195  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
20196  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20197  * self.numericalFlux.setDirichletValues(self.ebqe)
20198  */
20199  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
20200  __Pyx_GOTREF(__pyx_t_6);
20201  __pyx_t_14 = PyObject_GetItem(__pyx_t_6, __pyx_n_s_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 907, __pyx_L1_error)
20202  __Pyx_GOTREF(__pyx_t_14);
20203  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20204  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
20205  __Pyx_GOTREF(__pyx_t_6);
20206  __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 907, __pyx_L1_error)
20207  __Pyx_GOTREF(__pyx_t_21);
20208  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20209  __Pyx_GOTREF(__pyx_t_8);
20210  __Pyx_GIVEREF(__pyx_t_6);
20211  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
20212  __Pyx_GIVEREF(__pyx_t_21);
20213  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_21);
20214  __pyx_t_6 = 0;
20215  __pyx_t_21 = 0;
20216  __pyx_t_21 = PyObject_GetItem(__pyx_t_14, __pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 907, __pyx_L1_error)
20217  __Pyx_GOTREF(__pyx_t_21);
20218  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20219  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20220  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20221  __Pyx_GOTREF(__pyx_t_8);
20222  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_t); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 907, __pyx_L1_error)
20223  __Pyx_GOTREF(__pyx_t_14);
20224  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20225  __Pyx_INCREF(__pyx_v_g);
20226  __pyx_t_8 = __pyx_v_g; __pyx_t_6 = NULL;
20227  __pyx_t_24 = 0;
20228  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
20229  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
20230  if (likely(__pyx_t_6)) {
20231  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
20232  __Pyx_INCREF(__pyx_t_6);
20233  __Pyx_INCREF(function);
20234  __Pyx_DECREF_SET(__pyx_t_8, function);
20235  __pyx_t_24 = 1;
20236  }
20237  }
20238  #if CYTHON_FAST_PYCALL
20239  if (PyFunction_Check(__pyx_t_8)) {
20240  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_21, __pyx_t_14};
20241  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
20242  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20243  __Pyx_GOTREF(__pyx_t_1);
20244  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20245  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20246  } else
20247  #endif
20248  #if CYTHON_FAST_PYCCALL
20249  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
20250  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_21, __pyx_t_14};
20251  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
20252  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20253  __Pyx_GOTREF(__pyx_t_1);
20254  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20255  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20256  } else
20257  #endif
20258  {
20259  __pyx_t_25 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 907, __pyx_L1_error)
20260  __Pyx_GOTREF(__pyx_t_25);
20261  if (__pyx_t_6) {
20262  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_6); __pyx_t_6 = NULL;
20263  }
20264  __Pyx_GIVEREF(__pyx_t_21);
20265  PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_24, __pyx_t_21);
20266  __Pyx_GIVEREF(__pyx_t_14);
20267  PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_24, __pyx_t_14);
20268  __pyx_t_21 = 0;
20269  __pyx_t_14 = 0;
20270  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
20271  __Pyx_GOTREF(__pyx_t_1);
20272  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
20273  }
20274  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20275  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20276  __Pyx_GOTREF(__pyx_t_8);
20277  __pyx_t_25 = PyTuple_New(3); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 907, __pyx_L1_error)
20278  __Pyx_GOTREF(__pyx_t_25);
20279  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
20280  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
20281  PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_n_s_diffusiveFlux_bc);
20282  __Pyx_INCREF(__pyx_v_ck);
20283  __Pyx_GIVEREF(__pyx_v_ck);
20284  PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_v_ck);
20285  __Pyx_INCREF(__pyx_v_ci);
20286  __Pyx_GIVEREF(__pyx_v_ci);
20287  PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_v_ci);
20288  __pyx_t_14 = PyObject_GetItem(__pyx_t_8, __pyx_t_25); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 907, __pyx_L1_error)
20289  __Pyx_GOTREF(__pyx_t_14);
20290  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20291  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
20292  __pyx_t_25 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 907, __pyx_L1_error)
20293  __Pyx_GOTREF(__pyx_t_25);
20294  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
20295  __Pyx_GOTREF(__pyx_t_8);
20296  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 907, __pyx_L1_error)
20297  __Pyx_GOTREF(__pyx_t_21);
20298  __Pyx_GIVEREF(__pyx_t_25);
20299  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_25);
20300  __Pyx_GIVEREF(__pyx_t_8);
20301  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_8);
20302  __pyx_t_25 = 0;
20303  __pyx_t_8 = 0;
20304  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_21, __pyx_t_1) < 0)) __PYX_ERR(0, 907, __pyx_L1_error)
20305  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20306  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20307  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20308 
20309  /* "ADR.pyx":908
20310  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
20311  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20312  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
20313  * self.numericalFlux.setDirichletValues(self.ebqe)
20314  * if self.movingDomain:
20315  */
20316  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
20317  __Pyx_GOTREF(__pyx_t_1);
20318  __pyx_t_21 = PyTuple_New(3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 908, __pyx_L1_error)
20319  __Pyx_GOTREF(__pyx_t_21);
20320  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
20321  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
20322  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_n_s_diffusiveFlux_bc_flag);
20323  __Pyx_INCREF(__pyx_v_ck);
20324  __Pyx_GIVEREF(__pyx_v_ck);
20325  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_v_ck);
20326  __Pyx_INCREF(__pyx_v_ci);
20327  __Pyx_GIVEREF(__pyx_v_ci);
20328  PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_v_ci);
20329  __pyx_t_14 = PyObject_GetItem(__pyx_t_1, __pyx_t_21); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 908, __pyx_L1_error)
20330  __Pyx_GOTREF(__pyx_t_14);
20331  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20332  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20333  __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 908, __pyx_L1_error)
20334  __Pyx_GOTREF(__pyx_t_21);
20335  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
20336  __Pyx_GOTREF(__pyx_t_1);
20337  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error)
20338  __Pyx_GOTREF(__pyx_t_8);
20339  __Pyx_GIVEREF(__pyx_t_21);
20340  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_21);
20341  __Pyx_GIVEREF(__pyx_t_1);
20342  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
20343  __pyx_t_21 = 0;
20344  __pyx_t_1 = 0;
20345  if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_8, __pyx_int_1) < 0)) __PYX_ERR(0, 908, __pyx_L1_error)
20346  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20347  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20348  }
20349  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20350  }
20351  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20352  }
20353  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20354 
20355  /* "ADR.pyx":909
20356  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
20357  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20358  * self.numericalFlux.setDirichletValues(self.ebqe) # <<<<<<<<<<<<<<
20359  * if self.movingDomain:
20360  * self.MOVING_DOMAIN=1.0
20361  */
20362  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
20363  __Pyx_GOTREF(__pyx_t_2);
20364  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setDirichletValues); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 909, __pyx_L1_error)
20365  __Pyx_GOTREF(__pyx_t_20);
20366  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20367  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
20368  __Pyx_GOTREF(__pyx_t_2);
20369  __pyx_t_8 = NULL;
20370  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {
20371  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_20);
20372  if (likely(__pyx_t_8)) {
20373  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
20374  __Pyx_INCREF(__pyx_t_8);
20375  __Pyx_INCREF(function);
20376  __Pyx_DECREF_SET(__pyx_t_20, function);
20377  }
20378  }
20379  if (!__pyx_t_8) {
20380  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20381  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20382  __Pyx_GOTREF(__pyx_t_7);
20383  } else {
20384  #if CYTHON_FAST_PYCALL
20385  if (PyFunction_Check(__pyx_t_20)) {
20386  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
20387  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20388  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20389  __Pyx_GOTREF(__pyx_t_7);
20390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20391  } else
20392  #endif
20393  #if CYTHON_FAST_PYCCALL
20394  if (__Pyx_PyFastCFunction_Check(__pyx_t_20)) {
20395  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
20396  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_20, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20397  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20398  __Pyx_GOTREF(__pyx_t_7);
20399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20400  } else
20401  #endif
20402  {
20403  __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 909, __pyx_L1_error)
20404  __Pyx_GOTREF(__pyx_t_14);
20405  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
20406  __Pyx_GIVEREF(__pyx_t_2);
20407  PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_2);
20408  __pyx_t_2 = 0;
20409  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
20410  __Pyx_GOTREF(__pyx_t_7);
20411  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20412  }
20413  }
20414  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20415  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20416 
20417  /* "ADR.pyx":910
20418  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20419  * self.numericalFlux.setDirichletValues(self.ebqe)
20420  * if self.movingDomain: # <<<<<<<<<<<<<<
20421  * self.MOVING_DOMAIN=1.0
20422  * else:
20423  */
20424  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error)
20425  __Pyx_GOTREF(__pyx_t_7);
20426  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 910, __pyx_L1_error)
20427  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20428  if (__pyx_t_15) {
20429 
20430  /* "ADR.pyx":911
20431  * self.numericalFlux.setDirichletValues(self.ebqe)
20432  * if self.movingDomain:
20433  * self.MOVING_DOMAIN=1.0 # <<<<<<<<<<<<<<
20434  * else:
20435  * self.MOVING_DOMAIN=0.0
20436  */
20437  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_1_0) < 0) __PYX_ERR(0, 911, __pyx_L1_error)
20438 
20439  /* "ADR.pyx":910
20440  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
20441  * self.numericalFlux.setDirichletValues(self.ebqe)
20442  * if self.movingDomain: # <<<<<<<<<<<<<<
20443  * self.MOVING_DOMAIN=1.0
20444  * else:
20445  */
20446  goto __pyx_L132;
20447  }
20448 
20449  /* "ADR.pyx":913
20450  * self.MOVING_DOMAIN=1.0
20451  * else:
20452  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
20453  * #cek hack
20454  * self.movingDomain=False
20455  */
20456  /*else*/ {
20457  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
20458  }
20459  __pyx_L132:;
20460 
20461  /* "ADR.pyx":915
20462  * self.MOVING_DOMAIN=0.0
20463  * #cek hack
20464  * self.movingDomain=False # <<<<<<<<<<<<<<
20465  * self.MOVING_DOMAIN=0.0
20466  * if self.mesh.nodeVelocityArray==None:
20467  */
20468  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
20469 
20470  /* "ADR.pyx":916
20471  * #cek hack
20472  * self.movingDomain=False
20473  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
20474  * if self.mesh.nodeVelocityArray==None:
20475  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20476  */
20477  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(0, 916, __pyx_L1_error)
20478 
20479  /* "ADR.pyx":917
20480  * self.movingDomain=False
20481  * self.MOVING_DOMAIN=0.0
20482  * if self.mesh.nodeVelocityArray==None: # <<<<<<<<<<<<<<
20483  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20484  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20485  */
20486  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 917, __pyx_L1_error)
20487  __Pyx_GOTREF(__pyx_t_7);
20488  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nodeVelocityArray); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 917, __pyx_L1_error)
20489  __Pyx_GOTREF(__pyx_t_20);
20490  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20491  __pyx_t_7 = PyObject_RichCompare(__pyx_t_20, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 917, __pyx_L1_error)
20492  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20493  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 917, __pyx_L1_error)
20494  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20495  if (__pyx_t_15) {
20496 
20497  /* "ADR.pyx":918
20498  * self.MOVING_DOMAIN=0.0
20499  * if self.mesh.nodeVelocityArray==None:
20500  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d') # <<<<<<<<<<<<<<
20501  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20502  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20503  */
20504  __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 918, __pyx_L1_error)
20505  __Pyx_GOTREF(__pyx_t_20);
20506  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_zeros); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 918, __pyx_L1_error)
20507  __Pyx_GOTREF(__pyx_t_14);
20508  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20509  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 918, __pyx_L1_error)
20510  __Pyx_GOTREF(__pyx_t_20);
20511  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
20512  __Pyx_GOTREF(__pyx_t_2);
20513  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20514  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 918, __pyx_L1_error)
20515  __Pyx_GOTREF(__pyx_t_20);
20516  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20517  __pyx_t_2 = NULL;
20518  __pyx_t_13 = 0;
20519  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
20520  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
20521  if (likely(__pyx_t_2)) {
20522  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
20523  __Pyx_INCREF(__pyx_t_2);
20524  __Pyx_INCREF(function);
20525  __Pyx_DECREF_SET(__pyx_t_14, function);
20526  __pyx_t_13 = 1;
20527  }
20528  }
20529  #if CYTHON_FAST_PYCALL
20530  if (PyFunction_Check(__pyx_t_14)) {
20531  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_20, __pyx_n_s_d};
20532  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 918, __pyx_L1_error)
20533  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20534  __Pyx_GOTREF(__pyx_t_7);
20535  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20536  } else
20537  #endif
20538  #if CYTHON_FAST_PYCCALL
20539  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
20540  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_20, __pyx_n_s_d};
20541  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 918, __pyx_L1_error)
20542  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20543  __Pyx_GOTREF(__pyx_t_7);
20544  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20545  } else
20546  #endif
20547  {
20548  __pyx_t_8 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 918, __pyx_L1_error)
20549  __Pyx_GOTREF(__pyx_t_8);
20550  if (__pyx_t_2) {
20551  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
20552  }
20553  __Pyx_GIVEREF(__pyx_t_20);
20554  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_t_20);
20555  __Pyx_INCREF(__pyx_n_s_d);
20556  __Pyx_GIVEREF(__pyx_n_s_d);
20557  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_n_s_d);
20558  __pyx_t_20 = 0;
20559  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 918, __pyx_L1_error)
20560  __Pyx_GOTREF(__pyx_t_7);
20561  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20562  }
20563  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20564  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 918, __pyx_L1_error)
20565  __Pyx_GOTREF(__pyx_t_14);
20566  if (__Pyx_PyObject_SetAttrStr(__pyx_t_14, __pyx_n_s_nodeVelocityArray, __pyx_t_7) < 0) __PYX_ERR(0, 918, __pyx_L1_error)
20567  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20568  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20569 
20570  /* "ADR.pyx":917
20571  * self.movingDomain=False
20572  * self.MOVING_DOMAIN=0.0
20573  * if self.mesh.nodeVelocityArray==None: # <<<<<<<<<<<<<<
20574  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20575  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20576  */
20577  }
20578 
20579  /* "ADR.pyx":920
20580  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20581  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20582  * self.forceStrongConditions=coefficients.forceStrongDirichlet # <<<<<<<<<<<<<<
20583  * self.dirichletConditionsForceDOF = {}
20584  * if self.forceStrongConditions:
20585  */
20586  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_forceStrongDirichlet); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 920, __pyx_L1_error)
20587  __Pyx_GOTREF(__pyx_t_14);
20588  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions, __pyx_t_14) < 0) __PYX_ERR(0, 920, __pyx_L1_error)
20589  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20590 
20591  /* "ADR.pyx":921
20592  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20593  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20594  * self.dirichletConditionsForceDOF = {} # <<<<<<<<<<<<<<
20595  * if self.forceStrongConditions:
20596  * for cj in range(self.nc):
20597  */
20598  __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 921, __pyx_L1_error)
20599  __Pyx_GOTREF(__pyx_t_14);
20600  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF, __pyx_t_14) < 0) __PYX_ERR(0, 921, __pyx_L1_error)
20601  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20602 
20603  /* "ADR.pyx":922
20604  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20605  * self.dirichletConditionsForceDOF = {}
20606  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20607  * for cj in range(self.nc):
20608  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20609  */
20610  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 922, __pyx_L1_error)
20611  __Pyx_GOTREF(__pyx_t_14);
20612  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 922, __pyx_L1_error)
20613  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20614  if (__pyx_t_15) {
20615 
20616  /* "ADR.pyx":923
20617  * self.dirichletConditionsForceDOF = {}
20618  * if self.forceStrongConditions:
20619  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20620  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20621  * compKernelFlag = 0
20622  */
20623  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L1_error)
20624  __Pyx_GOTREF(__pyx_t_14);
20625  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 923, __pyx_L1_error)
20626  __Pyx_GOTREF(__pyx_t_7);
20627  __Pyx_GIVEREF(__pyx_t_14);
20628  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_14);
20629  __pyx_t_14 = 0;
20630  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L1_error)
20631  __Pyx_GOTREF(__pyx_t_14);
20632  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20633  if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) {
20634  __pyx_t_7 = __pyx_t_14; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
20635  __pyx_t_5 = NULL;
20636  } else {
20637  __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 923, __pyx_L1_error)
20638  __Pyx_GOTREF(__pyx_t_7);
20639  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error)
20640  }
20641  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20642  for (;;) {
20643  if (likely(!__pyx_t_5)) {
20644  if (likely(PyList_CheckExact(__pyx_t_7))) {
20645  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
20646  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20647  __pyx_t_14 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_14); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
20648  #else
20649  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L1_error)
20650  __Pyx_GOTREF(__pyx_t_14);
20651  #endif
20652  } else {
20653  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
20654  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20655  __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_14); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
20656  #else
20657  __pyx_t_14 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L1_error)
20658  __Pyx_GOTREF(__pyx_t_14);
20659  #endif
20660  }
20661  } else {
20662  __pyx_t_14 = __pyx_t_5(__pyx_t_7);
20663  if (unlikely(!__pyx_t_14)) {
20664  PyObject* exc_type = PyErr_Occurred();
20665  if (exc_type) {
20666  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
20667  else __PYX_ERR(0, 923, __pyx_L1_error)
20668  }
20669  break;
20670  }
20671  __Pyx_GOTREF(__pyx_t_14);
20672  }
20673  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_14);
20674  __pyx_t_14 = 0;
20675 
20676  /* "ADR.pyx":924
20677  * if self.forceStrongConditions:
20678  * for cj in range(self.nc):
20679  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False) # <<<<<<<<<<<<<<
20680  * compKernelFlag = 0
20681  * self.adr = ADR(self.nSpace_global,
20682  */
20683  __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 924, __pyx_L1_error)
20684  __Pyx_GOTREF(__pyx_t_14);
20685  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
20686  __Pyx_GOTREF(__pyx_t_8);
20687  __pyx_t_20 = PyObject_GetItem(__pyx_t_8, __pyx_v_cj); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 924, __pyx_L1_error)
20688  __Pyx_GOTREF(__pyx_t_20);
20689  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20690  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
20691  __Pyx_GOTREF(__pyx_t_8);
20692  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20693  __pyx_t_20 = PyObject_GetItem(__pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_cj); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 924, __pyx_L1_error)
20694  __Pyx_GOTREF(__pyx_t_20);
20695  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
20696  __Pyx_GOTREF(__pyx_t_2);
20697  __Pyx_GIVEREF(__pyx_t_8);
20698  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
20699  __Pyx_GIVEREF(__pyx_t_20);
20700  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_20);
20701  __pyx_t_8 = 0;
20702  __pyx_t_20 = 0;
20703  __pyx_t_20 = PyDict_New(); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 924, __pyx_L1_error)
20704  __Pyx_GOTREF(__pyx_t_20);
20705  if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_weakDirichletConditions, Py_False) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
20706  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_2, __pyx_t_20); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
20707  __Pyx_GOTREF(__pyx_t_8);
20708  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20709  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20710  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20711  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 924, __pyx_L1_error)
20712  __Pyx_GOTREF(__pyx_t_20);
20713  if (unlikely(PyObject_SetItem(__pyx_t_20, __pyx_v_cj, __pyx_t_8) < 0)) __PYX_ERR(0, 924, __pyx_L1_error)
20714  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20715  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20716 
20717  /* "ADR.pyx":923
20718  * self.dirichletConditionsForceDOF = {}
20719  * if self.forceStrongConditions:
20720  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20721  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20722  * compKernelFlag = 0
20723  */
20724  }
20725  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20726 
20727  /* "ADR.pyx":922
20728  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20729  * self.dirichletConditionsForceDOF = {}
20730  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20731  * for cj in range(self.nc):
20732  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20733  */
20734  }
20735 
20736  /* "ADR.pyx":925
20737  * for cj in range(self.nc):
20738  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20739  * compKernelFlag = 0 # <<<<<<<<<<<<<<
20740  * self.adr = ADR(self.nSpace_global,
20741  * self.nQuadraturePoints_element,
20742  */
20743  __pyx_v_compKernelFlag = 0;
20744 
20745  /* "ADR.pyx":926
20746  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20747  * compKernelFlag = 0
20748  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20749  * self.nQuadraturePoints_element,
20750  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20751  */
20752  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error)
20753  __Pyx_GOTREF(__pyx_t_7);
20754 
20755  /* "ADR.pyx":927
20756  * compKernelFlag = 0
20757  * self.adr = ADR(self.nSpace_global,
20758  * self.nQuadraturePoints_element, # <<<<<<<<<<<<<<
20759  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20760  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20761  */
20762  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 927, __pyx_L1_error)
20763  __Pyx_GOTREF(__pyx_t_8);
20764 
20765  /* "ADR.pyx":928
20766  * self.adr = ADR(self.nSpace_global,
20767  * self.nQuadraturePoints_element,
20768  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20769  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20770  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20771  */
20772  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 928, __pyx_L1_error)
20773  __Pyx_GOTREF(__pyx_t_20);
20774  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
20775  __Pyx_GOTREF(__pyx_t_2);
20776  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20777  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 928, __pyx_L1_error)
20778  __Pyx_GOTREF(__pyx_t_20);
20779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20780  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
20781  __Pyx_GOTREF(__pyx_t_2);
20782  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20783  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 928, __pyx_L1_error)
20784  __Pyx_GOTREF(__pyx_t_20);
20785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20786  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
20787  __Pyx_GOTREF(__pyx_t_2);
20788  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20789 
20790  /* "ADR.pyx":929
20791  * self.nQuadraturePoints_element,
20792  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20793  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20794  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20795  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20796  */
20797  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 929, __pyx_L1_error)
20798  __Pyx_GOTREF(__pyx_t_20);
20799  __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 929, __pyx_L1_error)
20800  __Pyx_GOTREF(__pyx_t_14);
20801  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20802  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 929, __pyx_L1_error)
20803  __Pyx_GOTREF(__pyx_t_20);
20804  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20805  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 929, __pyx_L1_error)
20806  __Pyx_GOTREF(__pyx_t_14);
20807  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20808  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 929, __pyx_L1_error)
20809  __Pyx_GOTREF(__pyx_t_20);
20810  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
20811  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_dim); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 929, __pyx_L1_error)
20812  __Pyx_GOTREF(__pyx_t_14);
20813  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20814 
20815  /* "ADR.pyx":930
20816  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20817  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20818  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20819  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20820  * compKernelFlag)
20821  */
20822  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
20823  __Pyx_GOTREF(__pyx_t_20);
20824  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
20825  __Pyx_GOTREF(__pyx_t_1);
20826  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20827  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
20828  __Pyx_GOTREF(__pyx_t_20);
20829  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20830  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
20831  __Pyx_GOTREF(__pyx_t_1);
20832  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
20833  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dim); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
20834  __Pyx_GOTREF(__pyx_t_20);
20835  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20836 
20837  /* "ADR.pyx":931
20838  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20839  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20840  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
20841  * compKernelFlag)
20842  * #mwf these are getting called by redistancing classes,
20843  */
20844  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
20845  __Pyx_GOTREF(__pyx_t_1);
20846 
20847  /* "ADR.pyx":932
20848  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20849  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20850  * compKernelFlag) # <<<<<<<<<<<<<<
20851  * #mwf these are getting called by redistancing classes,
20852  * def calculateCoefficients(self):
20853  */
20854  __pyx_t_21 = __Pyx_PyInt_From_long(__pyx_v_compKernelFlag); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 932, __pyx_L1_error)
20855  __Pyx_GOTREF(__pyx_t_21);
20856 
20857  /* "ADR.pyx":926
20858  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20859  * compKernelFlag = 0
20860  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20861  * self.nQuadraturePoints_element,
20862  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20863  */
20864  __pyx_t_25 = PyTuple_New(7); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 926, __pyx_L1_error)
20865  __Pyx_GOTREF(__pyx_t_25);
20866  __Pyx_GIVEREF(__pyx_t_7);
20867  PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_7);
20868  __Pyx_GIVEREF(__pyx_t_8);
20869  PyTuple_SET_ITEM(__pyx_t_25, 1, __pyx_t_8);
20870  __Pyx_GIVEREF(__pyx_t_2);
20871  PyTuple_SET_ITEM(__pyx_t_25, 2, __pyx_t_2);
20872  __Pyx_GIVEREF(__pyx_t_14);
20873  PyTuple_SET_ITEM(__pyx_t_25, 3, __pyx_t_14);
20874  __Pyx_GIVEREF(__pyx_t_20);
20875  PyTuple_SET_ITEM(__pyx_t_25, 4, __pyx_t_20);
20876  __Pyx_GIVEREF(__pyx_t_1);
20877  PyTuple_SET_ITEM(__pyx_t_25, 5, __pyx_t_1);
20878  __Pyx_GIVEREF(__pyx_t_21);
20879  PyTuple_SET_ITEM(__pyx_t_25, 6, __pyx_t_21);
20880  __pyx_t_7 = 0;
20881  __pyx_t_8 = 0;
20882  __pyx_t_2 = 0;
20883  __pyx_t_14 = 0;
20884  __pyx_t_20 = 0;
20885  __pyx_t_1 = 0;
20886  __pyx_t_21 = 0;
20887  __pyx_t_21 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3ADR_ADR), __pyx_t_25, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 926, __pyx_L1_error)
20888  __Pyx_GOTREF(__pyx_t_21);
20889  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
20890  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_adr, __pyx_t_21) < 0) __PYX_ERR(0, 926, __pyx_L1_error)
20891  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20892 
20893  /* "ADR.pyx":571
20894  * """
20895  * nCalls=0
20896  * def __init__(self, # <<<<<<<<<<<<<<
20897  * uDict,
20898  * phiDict,
20899  */
20900 
20901  /* function exit code */
20902  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20903  goto __pyx_L0;
20904  __pyx_L1_error:;
20905  __Pyx_XDECREF(__pyx_t_1);
20906  __Pyx_XDECREF(__pyx_t_2);
20907  __Pyx_XDECREF(__pyx_t_6);
20908  __Pyx_XDECREF(__pyx_t_7);
20909  __Pyx_XDECREF(__pyx_t_8);
20910  __Pyx_XDECREF(__pyx_t_14);
20911  __Pyx_XDECREF(__pyx_t_20);
20912  __Pyx_XDECREF(__pyx_t_21);
20913  __Pyx_XDECREF(__pyx_t_25);
20914  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20915  __pyx_r = NULL;
20916  __pyx_L0:;
20917  __Pyx_XDECREF(__pyx_v_Comm);
20918  __Pyx_XDECREF(__pyx_v_ci);
20919  __Pyx_XDECREF(__pyx_v_flag);
20920  __Pyx_XDECREF(__pyx_v_diffusionDict);
20921  __Pyx_XDECREF(__pyx_v_elementQuadratureDict);
20922  __Pyx_XDECREF(__pyx_v_I);
20923  __Pyx_XDECREF(__pyx_v_elementBoundaryQuadratureDict);
20924  __Pyx_XDECREF(__pyx_v_cj);
20925  __Pyx_XDECREF(__pyx_v_ebNE);
20926  __Pyx_XDECREF(__pyx_v_ebN);
20927  __Pyx_XDECREF(__pyx_v_eN_global);
20928  __Pyx_XDECREF(__pyx_v_ebN_element);
20929  __Pyx_XDECREF(__pyx_v_i);
20930  __Pyx_XDECREF(__pyx_v_nI);
20931  __Pyx_XDECREF(__pyx_v_n);
20932  __Pyx_XDECREF(__pyx_v_comm);
20933  __Pyx_XDECREF(__pyx_v_k);
20934  __Pyx_XDECREF(__pyx_v_PostProcessingTools);
20935  __Pyx_XDECREF(__pyx_v_Archiver);
20936  __Pyx_XDECREF(__pyx_v_fbcObject);
20937  __Pyx_XDECREF(__pyx_v_t);
20938  __Pyx_XDECREF(__pyx_v_g);
20939  __Pyx_XDECREF(__pyx_v_ck);
20940  __Pyx_XDECREF(__pyx_v_diffusiveFluxBoundaryConditionsDict);
20941  __Pyx_XDECREF(__pyx_v_u_j);
20942  __Pyx_XDECREF(__pyx_v_phi_k);
20943  __Pyx_XDECREF(__pyx_v_femSpace);
20944  __Pyx_XDECREF(__pyx_v_dc);
20945  __Pyx_XGIVEREF(__pyx_r);
20946  __Pyx_RefNannyFinishContext();
20947  return __pyx_r;
20948 }
20949 
20950 /* "ADR.pyx":934
20951  * compKernelFlag)
20952  * #mwf these are getting called by redistancing classes,
20953  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
20954  * pass
20955  * def getResidual(self,u,r):
20956  */
20957 
20958 /* Python wrapper */
20959 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20960 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_3calculateCoefficients = {"calculateCoefficients", (PyCFunction)__pyx_pw_3ADR_10LevelModel_3calculateCoefficients, METH_O, 0};
20961 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20962  PyObject *__pyx_r = 0;
20963  __Pyx_RefNannyDeclarations
20964  __Pyx_RefNannySetupContext("calculateCoefficients (wrapper)", 0);
20965  __pyx_r = __pyx_pf_3ADR_10LevelModel_2calculateCoefficients(__pyx_self, ((PyObject *)__pyx_v_self));
20966 
20967  /* function exit code */
20968  __Pyx_RefNannyFinishContext();
20969  return __pyx_r;
20970 }
20971 
20972 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
20973  PyObject *__pyx_r = NULL;
20974  __Pyx_RefNannyDeclarations
20975  __Pyx_RefNannySetupContext("calculateCoefficients", 0);
20976 
20977  /* function exit code */
20978  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20979  __Pyx_XGIVEREF(__pyx_r);
20980  __Pyx_RefNannyFinishContext();
20981  return __pyx_r;
20982 }
20983 
20984 /* "ADR.pyx":936
20985  * def calculateCoefficients(self):
20986  * pass
20987  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
20988  * import pdb
20989  * import copy
20990  */
20991 
20992 /* Python wrapper */
20993 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20994 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_5getResidual = {"getResidual", (PyCFunction)__pyx_pw_3ADR_10LevelModel_5getResidual, METH_VARARGS|METH_KEYWORDS, 0};
20995 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20996  PyObject *__pyx_v_self = 0;
20997  PyObject *__pyx_v_u = 0;
20998  PyObject *__pyx_v_r = 0;
20999  PyObject *__pyx_r = 0;
21000  __Pyx_RefNannyDeclarations
21001  __Pyx_RefNannySetupContext("getResidual (wrapper)", 0);
21002  {
21003  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_u,&__pyx_n_s_r,0};
21004  PyObject* values[3] = {0,0,0};
21005  if (unlikely(__pyx_kwds)) {
21006  Py_ssize_t kw_args;
21007  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21008  switch (pos_args) {
21009  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21010  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21011  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21012  case 0: break;
21013  default: goto __pyx_L5_argtuple_error;
21014  }
21015  kw_args = PyDict_Size(__pyx_kwds);
21016  switch (pos_args) {
21017  case 0:
21018  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
21019  else goto __pyx_L5_argtuple_error;
21020  case 1:
21021  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
21022  else {
21023  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 1); __PYX_ERR(0, 936, __pyx_L3_error)
21024  }
21025  case 2:
21026  if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
21027  else {
21028  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 2); __PYX_ERR(0, 936, __pyx_L3_error)
21029  }
21030  }
21031  if (unlikely(kw_args > 0)) {
21032  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResidual") < 0)) __PYX_ERR(0, 936, __pyx_L3_error)
21033  }
21034  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
21035  goto __pyx_L5_argtuple_error;
21036  } else {
21037  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21038  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21039  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21040  }
21041  __pyx_v_self = values[0];
21042  __pyx_v_u = values[1];
21043  __pyx_v_r = values[2];
21044  }
21045  goto __pyx_L4_argument_unpacking_done;
21046  __pyx_L5_argtuple_error:;
21047  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 936, __pyx_L3_error)
21048  __pyx_L3_error:;
21049  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
21050  __Pyx_RefNannyFinishContext();
21051  return NULL;
21052  __pyx_L4_argument_unpacking_done:;
21053  __pyx_r = __pyx_pf_3ADR_10LevelModel_4getResidual(__pyx_self, __pyx_v_self, __pyx_v_u, __pyx_v_r);
21054 
21055  /* function exit code */
21056  __Pyx_RefNannyFinishContext();
21057  return __pyx_r;
21058 }
21059 
21060 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r) {
21061  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
21062  CYTHON_UNUSED PyObject *__pyx_v_copy = NULL;
21063  PyObject *__pyx_v_globalSum = NULL;
21064  PyObject *__pyx_r = NULL;
21065  __Pyx_RefNannyDeclarations
21066  PyObject *__pyx_t_1 = NULL;
21067  PyObject *__pyx_t_2 = NULL;
21068  PyObject *__pyx_t_3 = NULL;
21069  PyObject *__pyx_t_4 = NULL;
21070  PyObject *__pyx_t_5 = NULL;
21071  PyObject *__pyx_t_6 = NULL;
21072  PyObject *__pyx_t_7 = NULL;
21073  PyObject *__pyx_t_8 = NULL;
21074  PyObject *__pyx_t_9 = NULL;
21075  PyObject *__pyx_t_10 = NULL;
21076  PyObject *__pyx_t_11 = NULL;
21077  PyObject *__pyx_t_12 = NULL;
21078  PyObject *__pyx_t_13 = NULL;
21079  PyObject *__pyx_t_14 = NULL;
21080  PyObject *__pyx_t_15 = NULL;
21081  PyObject *__pyx_t_16 = NULL;
21082  PyObject *__pyx_t_17 = NULL;
21083  PyObject *__pyx_t_18 = NULL;
21084  PyObject *__pyx_t_19 = NULL;
21085  PyObject *__pyx_t_20 = NULL;
21086  PyObject *__pyx_t_21 = NULL;
21087  PyObject *__pyx_t_22 = NULL;
21088  PyObject *__pyx_t_23 = NULL;
21089  PyObject *__pyx_t_24 = NULL;
21090  PyObject *__pyx_t_25 = NULL;
21091  PyObject *__pyx_t_26 = NULL;
21092  PyObject *__pyx_t_27 = NULL;
21093  PyObject *__pyx_t_28 = NULL;
21094  PyObject *__pyx_t_29 = NULL;
21095  PyObject *__pyx_t_30 = NULL;
21096  PyObject *__pyx_t_31 = NULL;
21097  PyObject *__pyx_t_32 = NULL;
21098  PyObject *__pyx_t_33 = NULL;
21099  PyObject *__pyx_t_34 = NULL;
21100  PyObject *__pyx_t_35 = NULL;
21101  PyObject *__pyx_t_36 = NULL;
21102  PyObject *__pyx_t_37 = NULL;
21103  PyObject *__pyx_t_38 = NULL;
21104  PyObject *__pyx_t_39 = NULL;
21105  PyObject *__pyx_t_40 = NULL;
21106  PyObject *__pyx_t_41 = NULL;
21107  PyObject *__pyx_t_42 = NULL;
21108  PyObject *__pyx_t_43 = NULL;
21109  PyObject *__pyx_t_44 = NULL;
21110  PyObject *__pyx_t_45 = NULL;
21111  PyObject *__pyx_t_46 = NULL;
21112  PyObject *__pyx_t_47 = NULL;
21113  PyObject *__pyx_t_48 = NULL;
21114  PyObject *__pyx_t_49 = NULL;
21115  PyObject *__pyx_t_50 = NULL;
21116  PyObject *__pyx_t_51 = NULL;
21117  PyObject *__pyx_t_52 = NULL;
21118  PyObject *__pyx_t_53 = NULL;
21119  PyObject *__pyx_t_54 = NULL;
21120  PyObject *__pyx_t_55 = NULL;
21121  int __pyx_t_56;
21122  PyObject *__pyx_t_57 = NULL;
21123  __Pyx_RefNannySetupContext("getResidual", 0);
21124 
21125  /* "ADR.pyx":937
21126  * pass
21127  * def getResidual(self,u,r):
21128  * import pdb # <<<<<<<<<<<<<<
21129  * import copy
21130  * from proteus.flcbdfWrappers import globalSum
21131  */
21132  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
21133  __Pyx_GOTREF(__pyx_t_1);
21134  __pyx_v_pdb = __pyx_t_1;
21135  __pyx_t_1 = 0;
21136 
21137  /* "ADR.pyx":938
21138  * def getResidual(self,u,r):
21139  * import pdb
21140  * import copy # <<<<<<<<<<<<<<
21141  * from proteus.flcbdfWrappers import globalSum
21142  * """
21143  */
21144  __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
21145  __Pyx_GOTREF(__pyx_t_1);
21146  __pyx_v_copy = __pyx_t_1;
21147  __pyx_t_1 = 0;
21148 
21149  /* "ADR.pyx":939
21150  * import pdb
21151  * import copy
21152  * from proteus.flcbdfWrappers import globalSum # <<<<<<<<<<<<<<
21153  * """
21154  * Calculate the element residuals and add in to the global residual
21155  */
21156  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
21157  __Pyx_GOTREF(__pyx_t_1);
21158  __Pyx_INCREF(__pyx_n_s_globalSum);
21159  __Pyx_GIVEREF(__pyx_n_s_globalSum);
21160  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_globalSum);
21161  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_flcbdfWrappers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
21162  __Pyx_GOTREF(__pyx_t_2);
21163  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21164  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalSum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
21165  __Pyx_GOTREF(__pyx_t_1);
21166  __Pyx_INCREF(__pyx_t_1);
21167  __pyx_v_globalSum = __pyx_t_1;
21168  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21169  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21170 
21171  /* "ADR.pyx":943
21172  * Calculate the element residuals and add in to the global residual
21173  * """
21174  * r.fill(0.0) # <<<<<<<<<<<<<<
21175  * #Load the unknowns into the finite element dof
21176  * self.setUnknowns(u)
21177  */
21178  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
21179  __Pyx_GOTREF(__pyx_t_2);
21180  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
21181  __Pyx_GOTREF(__pyx_t_1);
21182  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21183  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21184 
21185  /* "ADR.pyx":945
21186  * r.fill(0.0)
21187  * #Load the unknowns into the finite element dof
21188  * self.setUnknowns(u) # <<<<<<<<<<<<<<
21189  *
21190  *
21191  */
21192  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setUnknowns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
21193  __Pyx_GOTREF(__pyx_t_2);
21194  __pyx_t_3 = NULL;
21195  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21196  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
21197  if (likely(__pyx_t_3)) {
21198  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21199  __Pyx_INCREF(__pyx_t_3);
21200  __Pyx_INCREF(function);
21201  __Pyx_DECREF_SET(__pyx_t_2, function);
21202  }
21203  }
21204  if (!__pyx_t_3) {
21205  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21206  __Pyx_GOTREF(__pyx_t_1);
21207  } else {
21208  #if CYTHON_FAST_PYCALL
21209  if (PyFunction_Check(__pyx_t_2)) {
21210  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_u};
21211  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21212  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21213  __Pyx_GOTREF(__pyx_t_1);
21214  } else
21215  #endif
21216  #if CYTHON_FAST_PYCCALL
21217  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
21218  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_u};
21219  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21220  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
21221  __Pyx_GOTREF(__pyx_t_1);
21222  } else
21223  #endif
21224  {
21225  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
21226  __Pyx_GOTREF(__pyx_t_4);
21227  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
21228  __Pyx_INCREF(__pyx_v_u);
21229  __Pyx_GIVEREF(__pyx_v_u);
21230  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_u);
21231  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
21232  __Pyx_GOTREF(__pyx_t_1);
21233  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21234  }
21235  }
21236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21237  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21238 
21239  /* "ADR.pyx":949
21240  *
21241  * #no flux boundary conditions
21242  * self.adr.calculateResidual(#element # <<<<<<<<<<<<<<
21243  * self.u[0].femSpace.elementMaps.psi,
21244  * self.u[0].femSpace.elementMaps.grad_psi,
21245  */
21246  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
21247  __Pyx_GOTREF(__pyx_t_2);
21248  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_calculateResidual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
21249  __Pyx_GOTREF(__pyx_t_4);
21250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21251 
21252  /* "ADR.pyx":950
21253  * #no flux boundary conditions
21254  * self.adr.calculateResidual(#element
21255  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
21256  * self.u[0].femSpace.elementMaps.grad_psi,
21257  * self.mesh.nodeArray,
21258  */
21259  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21260  __Pyx_GOTREF(__pyx_t_2);
21261  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
21262  __Pyx_GOTREF(__pyx_t_3);
21263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21264  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21265  __Pyx_GOTREF(__pyx_t_2);
21266  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21267  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
21268  __Pyx_GOTREF(__pyx_t_3);
21269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21270  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
21271  __Pyx_GOTREF(__pyx_t_2);
21272  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21273 
21274  /* "ADR.pyx":951
21275  * self.adr.calculateResidual(#element
21276  * self.u[0].femSpace.elementMaps.psi,
21277  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
21278  * self.mesh.nodeArray,
21279  * self.mesh.elementNodesArray,
21280  */
21281  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21282  __Pyx_GOTREF(__pyx_t_3);
21283  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error)
21284  __Pyx_GOTREF(__pyx_t_5);
21285  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21286  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21287  __Pyx_GOTREF(__pyx_t_3);
21288  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21289  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error)
21290  __Pyx_GOTREF(__pyx_t_5);
21291  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21292  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
21293  __Pyx_GOTREF(__pyx_t_3);
21294  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21295 
21296  /* "ADR.pyx":952
21297  * self.u[0].femSpace.elementMaps.psi,
21298  * self.u[0].femSpace.elementMaps.grad_psi,
21299  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
21300  * self.mesh.elementNodesArray,
21301  * self.elementQuadratureWeights[('u',0)],
21302  */
21303  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
21304  __Pyx_GOTREF(__pyx_t_5);
21305  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
21306  __Pyx_GOTREF(__pyx_t_6);
21307  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21308 
21309  /* "ADR.pyx":953
21310  * self.u[0].femSpace.elementMaps.grad_psi,
21311  * self.mesh.nodeArray,
21312  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
21313  * self.elementQuadratureWeights[('u',0)],
21314  * self.u[0].femSpace.psi,
21315  */
21316  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
21317  __Pyx_GOTREF(__pyx_t_5);
21318  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 953, __pyx_L1_error)
21319  __Pyx_GOTREF(__pyx_t_7);
21320  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21321 
21322  /* "ADR.pyx":954
21323  * self.mesh.nodeArray,
21324  * self.mesh.elementNodesArray,
21325  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
21326  * self.u[0].femSpace.psi,
21327  * self.u[0].femSpace.grad_psi,
21328  */
21329  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
21330  __Pyx_GOTREF(__pyx_t_5);
21331  __pyx_t_8 = PyObject_GetItem(__pyx_t_5, __pyx_tuple__57); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L1_error)
21332  __Pyx_GOTREF(__pyx_t_8);
21333  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21334 
21335  /* "ADR.pyx":955
21336  * self.mesh.elementNodesArray,
21337  * self.elementQuadratureWeights[('u',0)],
21338  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
21339  * self.u[0].femSpace.grad_psi,
21340  * self.u[0].femSpace.psi,
21341  */
21342  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
21343  __Pyx_GOTREF(__pyx_t_5);
21344  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 955, __pyx_L1_error)
21345  __Pyx_GOTREF(__pyx_t_9);
21346  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21347  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
21348  __Pyx_GOTREF(__pyx_t_5);
21349  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21350  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 955, __pyx_L1_error)
21351  __Pyx_GOTREF(__pyx_t_9);
21352  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21353 
21354  /* "ADR.pyx":956
21355  * self.elementQuadratureWeights[('u',0)],
21356  * self.u[0].femSpace.psi,
21357  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
21358  * self.u[0].femSpace.psi,
21359  * self.u[0].femSpace.grad_psi,
21360  */
21361  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
21362  __Pyx_GOTREF(__pyx_t_5);
21363  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 956, __pyx_L1_error)
21364  __Pyx_GOTREF(__pyx_t_10);
21365  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21366  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
21367  __Pyx_GOTREF(__pyx_t_5);
21368  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21369  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 956, __pyx_L1_error)
21370  __Pyx_GOTREF(__pyx_t_10);
21371  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21372 
21373  /* "ADR.pyx":957
21374  * self.u[0].femSpace.psi,
21375  * self.u[0].femSpace.grad_psi,
21376  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
21377  * self.u[0].femSpace.grad_psi,
21378  * self.mesh.elementDiametersArray,
21379  */
21380  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
21381  __Pyx_GOTREF(__pyx_t_5);
21382  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L1_error)
21383  __Pyx_GOTREF(__pyx_t_11);
21384  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21385  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
21386  __Pyx_GOTREF(__pyx_t_5);
21387  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
21388  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L1_error)
21389  __Pyx_GOTREF(__pyx_t_11);
21390  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21391 
21392  /* "ADR.pyx":958
21393  * self.u[0].femSpace.grad_psi,
21394  * self.u[0].femSpace.psi,
21395  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
21396  * self.mesh.elementDiametersArray,
21397  * self.q[('cfl',0)],
21398  */
21399  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
21400  __Pyx_GOTREF(__pyx_t_5);
21401  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L1_error)
21402  __Pyx_GOTREF(__pyx_t_12);
21403  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21404  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
21405  __Pyx_GOTREF(__pyx_t_5);
21406  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
21407  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L1_error)
21408  __Pyx_GOTREF(__pyx_t_12);
21409  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21410 
21411  /* "ADR.pyx":959
21412  * self.u[0].femSpace.psi,
21413  * self.u[0].femSpace.grad_psi,
21414  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
21415  * self.q[('cfl',0)],
21416  * self.shockCapturing.shockCapturingFactor,
21417  */
21418  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
21419  __Pyx_GOTREF(__pyx_t_5);
21420  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 959, __pyx_L1_error)
21421  __Pyx_GOTREF(__pyx_t_13);
21422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21423 
21424  /* "ADR.pyx":960
21425  * self.u[0].femSpace.grad_psi,
21426  * self.mesh.elementDiametersArray,
21427  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
21428  * self.shockCapturing.shockCapturingFactor,
21429  * self.coefficients.sc_uref,
21430  */
21431  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 960, __pyx_L1_error)
21432  __Pyx_GOTREF(__pyx_t_5);
21433  __pyx_t_14 = PyObject_GetItem(__pyx_t_5, __pyx_tuple__58); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 960, __pyx_L1_error)
21434  __Pyx_GOTREF(__pyx_t_14);
21435  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21436 
21437  /* "ADR.pyx":961
21438  * self.mesh.elementDiametersArray,
21439  * self.q[('cfl',0)],
21440  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
21441  * self.coefficients.sc_uref,
21442  * self.coefficients.sc_beta,
21443  */
21444  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
21445  __Pyx_GOTREF(__pyx_t_5);
21446  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 961, __pyx_L1_error)
21447  __Pyx_GOTREF(__pyx_t_15);
21448  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21449 
21450  /* "ADR.pyx":962
21451  * self.q[('cfl',0)],
21452  * self.shockCapturing.shockCapturingFactor,
21453  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
21454  * self.coefficients.sc_beta,
21455  * self.coefficients.useMetrics,
21456  */
21457  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
21458  __Pyx_GOTREF(__pyx_t_5);
21459  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 962, __pyx_L1_error)
21460  __Pyx_GOTREF(__pyx_t_16);
21461  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21462 
21463  /* "ADR.pyx":963
21464  * self.shockCapturing.shockCapturingFactor,
21465  * self.coefficients.sc_uref,
21466  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
21467  * self.coefficients.useMetrics,
21468  * #element boundary
21469  */
21470  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
21471  __Pyx_GOTREF(__pyx_t_5);
21472  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 963, __pyx_L1_error)
21473  __Pyx_GOTREF(__pyx_t_17);
21474  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21475 
21476  /* "ADR.pyx":964
21477  * self.coefficients.sc_uref,
21478  * self.coefficients.sc_beta,
21479  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
21480  * #element boundary
21481  * self.u[0].femSpace.elementMaps.psi_trace,
21482  */
21483  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error)
21484  __Pyx_GOTREF(__pyx_t_5);
21485  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 964, __pyx_L1_error)
21486  __Pyx_GOTREF(__pyx_t_18);
21487  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21488 
21489  /* "ADR.pyx":966
21490  * self.coefficients.useMetrics,
21491  * #element boundary
21492  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
21493  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21494  * self.elementBoundaryQuadratureWeights[('u',0)],
21495  */
21496  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21497  __Pyx_GOTREF(__pyx_t_5);
21498  __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 966, __pyx_L1_error)
21499  __Pyx_GOTREF(__pyx_t_19);
21500  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21501  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21502  __Pyx_GOTREF(__pyx_t_5);
21503  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21504  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 966, __pyx_L1_error)
21505  __Pyx_GOTREF(__pyx_t_19);
21506  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21507  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
21508  __Pyx_GOTREF(__pyx_t_5);
21509  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21510 
21511  /* "ADR.pyx":967
21512  * #element boundary
21513  * self.u[0].femSpace.elementMaps.psi_trace,
21514  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
21515  * self.elementBoundaryQuadratureWeights[('u',0)],
21516  * self.u[0].femSpace.psi_trace,
21517  */
21518  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21519  __Pyx_GOTREF(__pyx_t_19);
21520  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 967, __pyx_L1_error)
21521  __Pyx_GOTREF(__pyx_t_20);
21522  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21523  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21524  __Pyx_GOTREF(__pyx_t_19);
21525  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21526  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 967, __pyx_L1_error)
21527  __Pyx_GOTREF(__pyx_t_20);
21528  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21529  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 967, __pyx_L1_error)
21530  __Pyx_GOTREF(__pyx_t_19);
21531  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21532 
21533  /* "ADR.pyx":968
21534  * self.u[0].femSpace.elementMaps.psi_trace,
21535  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21536  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
21537  * self.u[0].femSpace.psi_trace,
21538  * self.u[0].femSpace.grad_psi_trace,
21539  */
21540  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 968, __pyx_L1_error)
21541  __Pyx_GOTREF(__pyx_t_20);
21542  __pyx_t_21 = PyObject_GetItem(__pyx_t_20, __pyx_tuple__59); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 968, __pyx_L1_error)
21543  __Pyx_GOTREF(__pyx_t_21);
21544  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21545 
21546  /* "ADR.pyx":969
21547  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21548  * self.elementBoundaryQuadratureWeights[('u',0)],
21549  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21550  * self.u[0].femSpace.grad_psi_trace,
21551  * self.u[0].femSpace.psi_trace,
21552  */
21553  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 969, __pyx_L1_error)
21554  __Pyx_GOTREF(__pyx_t_20);
21555  __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 969, __pyx_L1_error)
21556  __Pyx_GOTREF(__pyx_t_22);
21557  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21558  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 969, __pyx_L1_error)
21559  __Pyx_GOTREF(__pyx_t_20);
21560  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
21561  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 969, __pyx_L1_error)
21562  __Pyx_GOTREF(__pyx_t_22);
21563  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21564 
21565  /* "ADR.pyx":970
21566  * self.elementBoundaryQuadratureWeights[('u',0)],
21567  * self.u[0].femSpace.psi_trace,
21568  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21569  * self.u[0].femSpace.psi_trace,
21570  * self.u[0].femSpace.grad_psi_trace,
21571  */
21572  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 970, __pyx_L1_error)
21573  __Pyx_GOTREF(__pyx_t_20);
21574  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 970, __pyx_L1_error)
21575  __Pyx_GOTREF(__pyx_t_23);
21576  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21577  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 970, __pyx_L1_error)
21578  __Pyx_GOTREF(__pyx_t_20);
21579  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
21580  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 970, __pyx_L1_error)
21581  __Pyx_GOTREF(__pyx_t_23);
21582  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21583 
21584  /* "ADR.pyx":971
21585  * self.u[0].femSpace.psi_trace,
21586  * self.u[0].femSpace.grad_psi_trace,
21587  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21588  * self.u[0].femSpace.grad_psi_trace,
21589  * self.u[0].femSpace.elementMaps.boundaryNormals,
21590  */
21591  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 971, __pyx_L1_error)
21592  __Pyx_GOTREF(__pyx_t_20);
21593  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 971, __pyx_L1_error)
21594  __Pyx_GOTREF(__pyx_t_24);
21595  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21596  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 971, __pyx_L1_error)
21597  __Pyx_GOTREF(__pyx_t_20);
21598  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
21599  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 971, __pyx_L1_error)
21600  __Pyx_GOTREF(__pyx_t_24);
21601  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21602 
21603  /* "ADR.pyx":972
21604  * self.u[0].femSpace.grad_psi_trace,
21605  * self.u[0].femSpace.psi_trace,
21606  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21607  * self.u[0].femSpace.elementMaps.boundaryNormals,
21608  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21609  */
21610  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 972, __pyx_L1_error)
21611  __Pyx_GOTREF(__pyx_t_20);
21612  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 972, __pyx_L1_error)
21613  __Pyx_GOTREF(__pyx_t_25);
21614  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21615  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 972, __pyx_L1_error)
21616  __Pyx_GOTREF(__pyx_t_20);
21617  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
21618  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 972, __pyx_L1_error)
21619  __Pyx_GOTREF(__pyx_t_25);
21620  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21621 
21622  /* "ADR.pyx":973
21623  * self.u[0].femSpace.psi_trace,
21624  * self.u[0].femSpace.grad_psi_trace,
21625  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
21626  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21627  * #physics
21628  */
21629  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21630  __Pyx_GOTREF(__pyx_t_20);
21631  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 973, __pyx_L1_error)
21632  __Pyx_GOTREF(__pyx_t_26);
21633  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21634  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21635  __Pyx_GOTREF(__pyx_t_20);
21636  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21637  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 973, __pyx_L1_error)
21638  __Pyx_GOTREF(__pyx_t_26);
21639  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21640  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 973, __pyx_L1_error)
21641  __Pyx_GOTREF(__pyx_t_20);
21642  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21643 
21644  /* "ADR.pyx":974
21645  * self.u[0].femSpace.grad_psi_trace,
21646  * self.u[0].femSpace.elementMaps.boundaryNormals,
21647  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
21648  * #physics
21649  * self.mesh.nElements_global,
21650  */
21651  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21652  __Pyx_GOTREF(__pyx_t_26);
21653  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_26, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 974, __pyx_L1_error)
21654  __Pyx_GOTREF(__pyx_t_27);
21655  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21656  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21657  __Pyx_GOTREF(__pyx_t_26);
21658  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21659  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 974, __pyx_L1_error)
21660  __Pyx_GOTREF(__pyx_t_27);
21661  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21662  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 974, __pyx_L1_error)
21663  __Pyx_GOTREF(__pyx_t_26);
21664  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21665 
21666  /* "ADR.pyx":976
21667  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21668  * #physics
21669  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
21670  * self.u[0].femSpace.dofMap.l2g,
21671  * self.u[0].dof,
21672  */
21673  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 976, __pyx_L1_error)
21674  __Pyx_GOTREF(__pyx_t_27);
21675  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 976, __pyx_L1_error)
21676  __Pyx_GOTREF(__pyx_t_28);
21677  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21678 
21679  /* "ADR.pyx":977
21680  * #physics
21681  * self.mesh.nElements_global,
21682  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
21683  * self.u[0].dof,
21684  * self.coefficients.sdInfo[(0,0)][0],
21685  */
21686  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21687  __Pyx_GOTREF(__pyx_t_27);
21688  __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 977, __pyx_L1_error)
21689  __Pyx_GOTREF(__pyx_t_29);
21690  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21691  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21692  __Pyx_GOTREF(__pyx_t_27);
21693  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21694  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 977, __pyx_L1_error)
21695  __Pyx_GOTREF(__pyx_t_29);
21696  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21697  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_l2g); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 977, __pyx_L1_error)
21698  __Pyx_GOTREF(__pyx_t_27);
21699  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21700 
21701  /* "ADR.pyx":978
21702  * self.mesh.nElements_global,
21703  * self.u[0].femSpace.dofMap.l2g,
21704  * self.u[0].dof, # <<<<<<<<<<<<<<
21705  * self.coefficients.sdInfo[(0,0)][0],
21706  * self.coefficients.sdInfo[(0,0)][1],
21707  */
21708  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 978, __pyx_L1_error)
21709  __Pyx_GOTREF(__pyx_t_29);
21710  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_29, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 978, __pyx_L1_error)
21711  __Pyx_GOTREF(__pyx_t_30);
21712  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21713  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_dof); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 978, __pyx_L1_error)
21714  __Pyx_GOTREF(__pyx_t_29);
21715  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21716 
21717  /* "ADR.pyx":979
21718  * self.u[0].femSpace.dofMap.l2g,
21719  * self.u[0].dof,
21720  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
21721  * self.coefficients.sdInfo[(0,0)][1],
21722  * self.q[('a',0,0)],
21723  */
21724  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 979, __pyx_L1_error)
21725  __Pyx_GOTREF(__pyx_t_30);
21726  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 979, __pyx_L1_error)
21727  __Pyx_GOTREF(__pyx_t_31);
21728  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21729  __pyx_t_30 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__60); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 979, __pyx_L1_error)
21730  __Pyx_GOTREF(__pyx_t_30);
21731  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
21732  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 979, __pyx_L1_error)
21733  __Pyx_GOTREF(__pyx_t_31);
21734  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21735 
21736  /* "ADR.pyx":980
21737  * self.u[0].dof,
21738  * self.coefficients.sdInfo[(0,0)][0],
21739  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
21740  * self.q[('a',0,0)],
21741  * self.q[('df',0,0)],
21742  */
21743  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 980, __pyx_L1_error)
21744  __Pyx_GOTREF(__pyx_t_30);
21745  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 980, __pyx_L1_error)
21746  __Pyx_GOTREF(__pyx_t_32);
21747  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21748  __pyx_t_30 = PyObject_GetItem(__pyx_t_32, __pyx_tuple__61); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 980, __pyx_L1_error)
21749  __Pyx_GOTREF(__pyx_t_30);
21750  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
21751  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_30, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 980, __pyx_L1_error)
21752  __Pyx_GOTREF(__pyx_t_32);
21753  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21754 
21755  /* "ADR.pyx":981
21756  * self.coefficients.sdInfo[(0,0)][0],
21757  * self.coefficients.sdInfo[(0,0)][1],
21758  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
21759  * self.q[('df',0,0)],
21760  * self.q[('r',0)],
21761  */
21762  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 981, __pyx_L1_error)
21763  __Pyx_GOTREF(__pyx_t_30);
21764  __pyx_t_33 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__62); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 981, __pyx_L1_error)
21765  __Pyx_GOTREF(__pyx_t_33);
21766  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21767 
21768  /* "ADR.pyx":982
21769  * self.coefficients.sdInfo[(0,0)][1],
21770  * self.q[('a',0,0)],
21771  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
21772  * self.q[('r',0)],
21773  * self.shockCapturing.lag,
21774  */
21775  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 982, __pyx_L1_error)
21776  __Pyx_GOTREF(__pyx_t_30);
21777  __pyx_t_34 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__63); if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 982, __pyx_L1_error)
21778  __Pyx_GOTREF(__pyx_t_34);
21779  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21780 
21781  /* "ADR.pyx":983
21782  * self.q[('a',0,0)],
21783  * self.q[('df',0,0)],
21784  * self.q[('r',0)], # <<<<<<<<<<<<<<
21785  * self.shockCapturing.lag,
21786  * self.shockCapturing.shockCapturingFactor,
21787  */
21788  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 983, __pyx_L1_error)
21789  __Pyx_GOTREF(__pyx_t_30);
21790  __pyx_t_35 = PyObject_GetItem(__pyx_t_30, __pyx_tuple__64); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 983, __pyx_L1_error)
21791  __Pyx_GOTREF(__pyx_t_35);
21792  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21793 
21794  /* "ADR.pyx":984
21795  * self.q[('df',0,0)],
21796  * self.q[('r',0)],
21797  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
21798  * self.shockCapturing.shockCapturingFactor,
21799  * self.shockCapturing.numDiff[0],
21800  */
21801  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 984, __pyx_L1_error)
21802  __Pyx_GOTREF(__pyx_t_30);
21803  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_lag); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 984, __pyx_L1_error)
21804  __Pyx_GOTREF(__pyx_t_36);
21805  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21806 
21807  /* "ADR.pyx":985
21808  * self.q[('r',0)],
21809  * self.shockCapturing.lag,
21810  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
21811  * self.shockCapturing.numDiff[0],
21812  * self.shockCapturing.numDiff_last[0],
21813  */
21814  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 985, __pyx_L1_error)
21815  __Pyx_GOTREF(__pyx_t_30);
21816  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 985, __pyx_L1_error)
21817  __Pyx_GOTREF(__pyx_t_37);
21818  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21819 
21820  /* "ADR.pyx":986
21821  * self.shockCapturing.lag,
21822  * self.shockCapturing.shockCapturingFactor,
21823  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
21824  * self.shockCapturing.numDiff_last[0],
21825  * self.offset[0],
21826  */
21827  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 986, __pyx_L1_error)
21828  __Pyx_GOTREF(__pyx_t_30);
21829  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 986, __pyx_L1_error)
21830  __Pyx_GOTREF(__pyx_t_38);
21831  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21832  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_38, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 986, __pyx_L1_error)
21833  __Pyx_GOTREF(__pyx_t_30);
21834  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21835 
21836  /* "ADR.pyx":987
21837  * self.shockCapturing.shockCapturingFactor,
21838  * self.shockCapturing.numDiff[0],
21839  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
21840  * self.offset[0],
21841  * self.stride[0],
21842  */
21843  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 987, __pyx_L1_error)
21844  __Pyx_GOTREF(__pyx_t_38);
21845  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_38, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 987, __pyx_L1_error)
21846  __Pyx_GOTREF(__pyx_t_39);
21847  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21848  __pyx_t_38 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 987, __pyx_L1_error)
21849  __Pyx_GOTREF(__pyx_t_38);
21850  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21851 
21852  /* "ADR.pyx":988
21853  * self.shockCapturing.numDiff[0],
21854  * self.shockCapturing.numDiff_last[0],
21855  * self.offset[0], # <<<<<<<<<<<<<<
21856  * self.stride[0],
21857  * r,
21858  */
21859  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 988, __pyx_L1_error)
21860  __Pyx_GOTREF(__pyx_t_39);
21861  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 988, __pyx_L1_error)
21862  __Pyx_GOTREF(__pyx_t_40);
21863  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21864 
21865  /* "ADR.pyx":989
21866  * self.shockCapturing.numDiff_last[0],
21867  * self.offset[0],
21868  * self.stride[0], # <<<<<<<<<<<<<<
21869  * r,
21870  * self.mesh.nExteriorElementBoundaries_global,
21871  */
21872  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stride); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 989, __pyx_L1_error)
21873  __Pyx_GOTREF(__pyx_t_39);
21874  __pyx_t_41 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 989, __pyx_L1_error)
21875  __Pyx_GOTREF(__pyx_t_41);
21876  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21877 
21878  /* "ADR.pyx":991
21879  * self.stride[0],
21880  * r,
21881  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
21882  * self.mesh.exteriorElementBoundariesArray,
21883  * self.mesh.elementBoundaryElementsArray,
21884  */
21885  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 991, __pyx_L1_error)
21886  __Pyx_GOTREF(__pyx_t_39);
21887  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 991, __pyx_L1_error)
21888  __Pyx_GOTREF(__pyx_t_42);
21889  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21890 
21891  /* "ADR.pyx":992
21892  * r,
21893  * self.mesh.nExteriorElementBoundaries_global,
21894  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
21895  * self.mesh.elementBoundaryElementsArray,
21896  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21897  */
21898  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 992, __pyx_L1_error)
21899  __Pyx_GOTREF(__pyx_t_39);
21900  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 992, __pyx_L1_error)
21901  __Pyx_GOTREF(__pyx_t_43);
21902  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21903 
21904  /* "ADR.pyx":993
21905  * self.mesh.nExteriorElementBoundaries_global,
21906  * self.mesh.exteriorElementBoundariesArray,
21907  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
21908  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21909  * self.ebqe[('a',0,0)],
21910  */
21911  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 993, __pyx_L1_error)
21912  __Pyx_GOTREF(__pyx_t_39);
21913  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 993, __pyx_L1_error)
21914  __Pyx_GOTREF(__pyx_t_44);
21915  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21916 
21917  /* "ADR.pyx":994
21918  * self.mesh.exteriorElementBoundariesArray,
21919  * self.mesh.elementBoundaryElementsArray,
21920  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
21921  * self.ebqe[('a',0,0)],
21922  * self.ebqe[('df',0,0)],
21923  */
21924  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 994, __pyx_L1_error)
21925  __Pyx_GOTREF(__pyx_t_39);
21926  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 994, __pyx_L1_error)
21927  __Pyx_GOTREF(__pyx_t_45);
21928  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21929 
21930  /* "ADR.pyx":995
21931  * self.mesh.elementBoundaryElementsArray,
21932  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21933  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
21934  * self.ebqe[('df',0,0)],
21935  * self.numericalFlux.isDOFBoundary[0],
21936  */
21937  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 995, __pyx_L1_error)
21938  __Pyx_GOTREF(__pyx_t_39);
21939  __pyx_t_46 = PyObject_GetItem(__pyx_t_39, __pyx_tuple__65); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 995, __pyx_L1_error)
21940  __Pyx_GOTREF(__pyx_t_46);
21941  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21942 
21943  /* "ADR.pyx":996
21944  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21945  * self.ebqe[('a',0,0)],
21946  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
21947  * self.numericalFlux.isDOFBoundary[0],
21948  * self.numericalFlux.ebqe[('u',0)],
21949  */
21950  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 996, __pyx_L1_error)
21951  __Pyx_GOTREF(__pyx_t_39);
21952  __pyx_t_47 = PyObject_GetItem(__pyx_t_39, __pyx_tuple__66); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 996, __pyx_L1_error)
21953  __Pyx_GOTREF(__pyx_t_47);
21954  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21955 
21956  /* "ADR.pyx":997
21957  * self.ebqe[('a',0,0)],
21958  * self.ebqe[('df',0,0)],
21959  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
21960  * self.numericalFlux.ebqe[('u',0)],
21961  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21962  */
21963  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 997, __pyx_L1_error)
21964  __Pyx_GOTREF(__pyx_t_39);
21965  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 997, __pyx_L1_error)
21966  __Pyx_GOTREF(__pyx_t_48);
21967  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21968  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_48, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 997, __pyx_L1_error)
21969  __Pyx_GOTREF(__pyx_t_39);
21970  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21971 
21972  /* "ADR.pyx":998
21973  * self.ebqe[('df',0,0)],
21974  * self.numericalFlux.isDOFBoundary[0],
21975  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
21976  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21977  * self.ebqe[('advectiveFlux_bc_flag',0)],
21978  */
21979  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 998, __pyx_L1_error)
21980  __Pyx_GOTREF(__pyx_t_48);
21981  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_48, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 998, __pyx_L1_error)
21982  __Pyx_GOTREF(__pyx_t_49);
21983  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21984  __pyx_t_48 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__67); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 998, __pyx_L1_error)
21985  __Pyx_GOTREF(__pyx_t_48);
21986  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21987 
21988  /* "ADR.pyx":999
21989  * self.numericalFlux.isDOFBoundary[0],
21990  * self.numericalFlux.ebqe[('u',0)],
21991  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
21992  * self.ebqe[('advectiveFlux_bc_flag',0)],
21993  * self.ebqe[('diffusiveFlux_bc',0,0)],
21994  */
21995  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 999, __pyx_L1_error)
21996  __Pyx_GOTREF(__pyx_t_49);
21997  __pyx_t_50 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__68); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 999, __pyx_L1_error)
21998  __Pyx_GOTREF(__pyx_t_50);
21999  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22000 
22001  /* "ADR.pyx":1000
22002  * self.numericalFlux.ebqe[('u',0)],
22003  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
22004  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
22005  * self.ebqe[('diffusiveFlux_bc',0,0)],
22006  * self.ebqe[('advectiveFlux_bc',0)],
22007  */
22008  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1000, __pyx_L1_error)
22009  __Pyx_GOTREF(__pyx_t_49);
22010  __pyx_t_51 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__69); if (unlikely(!__pyx_t_51)) __PYX_ERR(0, 1000, __pyx_L1_error)
22011  __Pyx_GOTREF(__pyx_t_51);
22012  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22013 
22014  /* "ADR.pyx":1001
22015  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
22016  * self.ebqe[('advectiveFlux_bc_flag',0)],
22017  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
22018  * self.ebqe[('advectiveFlux_bc',0)],
22019  * self.ebqe['penalty'],
22020  */
22021  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1001, __pyx_L1_error)
22022  __Pyx_GOTREF(__pyx_t_49);
22023  __pyx_t_52 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__70); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1001, __pyx_L1_error)
22024  __Pyx_GOTREF(__pyx_t_52);
22025  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22026 
22027  /* "ADR.pyx":1002
22028  * self.ebqe[('advectiveFlux_bc_flag',0)],
22029  * self.ebqe[('diffusiveFlux_bc',0,0)],
22030  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
22031  * self.ebqe['penalty'],
22032  * self.numericalFlux.boundaryAdjoint_sigma)
22033  */
22034  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1002, __pyx_L1_error)
22035  __Pyx_GOTREF(__pyx_t_49);
22036  __pyx_t_53 = PyObject_GetItem(__pyx_t_49, __pyx_tuple__71); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1002, __pyx_L1_error)
22037  __Pyx_GOTREF(__pyx_t_53);
22038  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22039 
22040  /* "ADR.pyx":1003
22041  * self.ebqe[('diffusiveFlux_bc',0,0)],
22042  * self.ebqe[('advectiveFlux_bc',0)],
22043  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
22044  * self.numericalFlux.boundaryAdjoint_sigma)
22045  * log("Global residual",level=9,data=r)
22046  */
22047  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1003, __pyx_L1_error)
22048  __Pyx_GOTREF(__pyx_t_49);
22049  __pyx_t_54 = PyObject_GetItem(__pyx_t_49, __pyx_n_s_penalty); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1003, __pyx_L1_error)
22050  __Pyx_GOTREF(__pyx_t_54);
22051  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22052 
22053  /* "ADR.pyx":1004
22054  * self.ebqe[('advectiveFlux_bc',0)],
22055  * self.ebqe['penalty'],
22056  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
22057  * log("Global residual",level=9,data=r)
22058  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22059  */
22060  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1004, __pyx_L1_error)
22061  __Pyx_GOTREF(__pyx_t_49);
22062  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1004, __pyx_L1_error)
22063  __Pyx_GOTREF(__pyx_t_55);
22064  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
22065  __pyx_t_49 = NULL;
22066  __pyx_t_56 = 0;
22067  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
22068  __pyx_t_49 = PyMethod_GET_SELF(__pyx_t_4);
22069  if (likely(__pyx_t_49)) {
22070  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22071  __Pyx_INCREF(__pyx_t_49);
22072  __Pyx_INCREF(function);
22073  __Pyx_DECREF_SET(__pyx_t_4, function);
22074  __pyx_t_56 = 1;
22075  }
22076  }
22077  #if CYTHON_FAST_PYCALL
22078  if (PyFunction_Check(__pyx_t_4)) {
22079  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
22080  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22081  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
22082  __Pyx_GOTREF(__pyx_t_1);
22083  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22084  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22085  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22086  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22087  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22088  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
22089  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22090  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22091  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22092  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22093  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22094  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22095  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22096  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22097  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
22098  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22099  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
22100  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22101  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
22102  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
22103  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
22104  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
22105  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22106  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
22107  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22108  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22109  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
22110  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22111  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
22112  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
22113  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
22114  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
22115  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
22116  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
22117  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22118  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
22119  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22120  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
22121  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
22122  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
22123  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
22124  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
22125  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
22126  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
22127  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22128  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
22129  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
22130  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
22131  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22132  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22133  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22134  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22135  } else
22136  #endif
22137  #if CYTHON_FAST_PYCCALL
22138  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
22139  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
22140  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22141  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
22142  __Pyx_GOTREF(__pyx_t_1);
22143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22144  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22145  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22146  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22147  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22148  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
22149  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22150  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22151  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22152  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22153  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22154  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22155  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22156  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22157  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
22158  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22159  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
22160  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22161  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
22162  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
22163  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
22164  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
22165  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22166  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
22167  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22168  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22169  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
22170  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22171  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
22172  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
22173  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
22174  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
22175  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
22176  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
22177  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22178  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
22179  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22180  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
22181  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
22182  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
22183  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
22184  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
22185  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
22186  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
22187  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22188  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
22189  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
22190  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
22191  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22192  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22193  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22194  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22195  } else
22196  #endif
22197  {
22198  __pyx_t_57 = PyTuple_New(53+__pyx_t_56); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 949, __pyx_L1_error)
22199  __Pyx_GOTREF(__pyx_t_57);
22200  if (__pyx_t_49) {
22201  __Pyx_GIVEREF(__pyx_t_49); PyTuple_SET_ITEM(__pyx_t_57, 0, __pyx_t_49); __pyx_t_49 = NULL;
22202  }
22203  __Pyx_GIVEREF(__pyx_t_2);
22204  PyTuple_SET_ITEM(__pyx_t_57, 0+__pyx_t_56, __pyx_t_2);
22205  __Pyx_GIVEREF(__pyx_t_3);
22206  PyTuple_SET_ITEM(__pyx_t_57, 1+__pyx_t_56, __pyx_t_3);
22207  __Pyx_GIVEREF(__pyx_t_6);
22208  PyTuple_SET_ITEM(__pyx_t_57, 2+__pyx_t_56, __pyx_t_6);
22209  __Pyx_GIVEREF(__pyx_t_7);
22210  PyTuple_SET_ITEM(__pyx_t_57, 3+__pyx_t_56, __pyx_t_7);
22211  __Pyx_GIVEREF(__pyx_t_8);
22212  PyTuple_SET_ITEM(__pyx_t_57, 4+__pyx_t_56, __pyx_t_8);
22213  __Pyx_GIVEREF(__pyx_t_9);
22214  PyTuple_SET_ITEM(__pyx_t_57, 5+__pyx_t_56, __pyx_t_9);
22215  __Pyx_GIVEREF(__pyx_t_10);
22216  PyTuple_SET_ITEM(__pyx_t_57, 6+__pyx_t_56, __pyx_t_10);
22217  __Pyx_GIVEREF(__pyx_t_11);
22218  PyTuple_SET_ITEM(__pyx_t_57, 7+__pyx_t_56, __pyx_t_11);
22219  __Pyx_GIVEREF(__pyx_t_12);
22220  PyTuple_SET_ITEM(__pyx_t_57, 8+__pyx_t_56, __pyx_t_12);
22221  __Pyx_GIVEREF(__pyx_t_13);
22222  PyTuple_SET_ITEM(__pyx_t_57, 9+__pyx_t_56, __pyx_t_13);
22223  __Pyx_GIVEREF(__pyx_t_14);
22224  PyTuple_SET_ITEM(__pyx_t_57, 10+__pyx_t_56, __pyx_t_14);
22225  __Pyx_GIVEREF(__pyx_t_15);
22226  PyTuple_SET_ITEM(__pyx_t_57, 11+__pyx_t_56, __pyx_t_15);
22227  __Pyx_GIVEREF(__pyx_t_16);
22228  PyTuple_SET_ITEM(__pyx_t_57, 12+__pyx_t_56, __pyx_t_16);
22229  __Pyx_GIVEREF(__pyx_t_17);
22230  PyTuple_SET_ITEM(__pyx_t_57, 13+__pyx_t_56, __pyx_t_17);
22231  __Pyx_GIVEREF(__pyx_t_18);
22232  PyTuple_SET_ITEM(__pyx_t_57, 14+__pyx_t_56, __pyx_t_18);
22233  __Pyx_GIVEREF(__pyx_t_5);
22234  PyTuple_SET_ITEM(__pyx_t_57, 15+__pyx_t_56, __pyx_t_5);
22235  __Pyx_GIVEREF(__pyx_t_19);
22236  PyTuple_SET_ITEM(__pyx_t_57, 16+__pyx_t_56, __pyx_t_19);
22237  __Pyx_GIVEREF(__pyx_t_21);
22238  PyTuple_SET_ITEM(__pyx_t_57, 17+__pyx_t_56, __pyx_t_21);
22239  __Pyx_GIVEREF(__pyx_t_22);
22240  PyTuple_SET_ITEM(__pyx_t_57, 18+__pyx_t_56, __pyx_t_22);
22241  __Pyx_GIVEREF(__pyx_t_23);
22242  PyTuple_SET_ITEM(__pyx_t_57, 19+__pyx_t_56, __pyx_t_23);
22243  __Pyx_GIVEREF(__pyx_t_24);
22244  PyTuple_SET_ITEM(__pyx_t_57, 20+__pyx_t_56, __pyx_t_24);
22245  __Pyx_GIVEREF(__pyx_t_25);
22246  PyTuple_SET_ITEM(__pyx_t_57, 21+__pyx_t_56, __pyx_t_25);
22247  __Pyx_GIVEREF(__pyx_t_20);
22248  PyTuple_SET_ITEM(__pyx_t_57, 22+__pyx_t_56, __pyx_t_20);
22249  __Pyx_GIVEREF(__pyx_t_26);
22250  PyTuple_SET_ITEM(__pyx_t_57, 23+__pyx_t_56, __pyx_t_26);
22251  __Pyx_GIVEREF(__pyx_t_28);
22252  PyTuple_SET_ITEM(__pyx_t_57, 24+__pyx_t_56, __pyx_t_28);
22253  __Pyx_GIVEREF(__pyx_t_27);
22254  PyTuple_SET_ITEM(__pyx_t_57, 25+__pyx_t_56, __pyx_t_27);
22255  __Pyx_GIVEREF(__pyx_t_29);
22256  PyTuple_SET_ITEM(__pyx_t_57, 26+__pyx_t_56, __pyx_t_29);
22257  __Pyx_GIVEREF(__pyx_t_31);
22258  PyTuple_SET_ITEM(__pyx_t_57, 27+__pyx_t_56, __pyx_t_31);
22259  __Pyx_GIVEREF(__pyx_t_32);
22260  PyTuple_SET_ITEM(__pyx_t_57, 28+__pyx_t_56, __pyx_t_32);
22261  __Pyx_GIVEREF(__pyx_t_33);
22262  PyTuple_SET_ITEM(__pyx_t_57, 29+__pyx_t_56, __pyx_t_33);
22263  __Pyx_GIVEREF(__pyx_t_34);
22264  PyTuple_SET_ITEM(__pyx_t_57, 30+__pyx_t_56, __pyx_t_34);
22265  __Pyx_GIVEREF(__pyx_t_35);
22266  PyTuple_SET_ITEM(__pyx_t_57, 31+__pyx_t_56, __pyx_t_35);
22267  __Pyx_GIVEREF(__pyx_t_36);
22268  PyTuple_SET_ITEM(__pyx_t_57, 32+__pyx_t_56, __pyx_t_36);
22269  __Pyx_GIVEREF(__pyx_t_37);
22270  PyTuple_SET_ITEM(__pyx_t_57, 33+__pyx_t_56, __pyx_t_37);
22271  __Pyx_GIVEREF(__pyx_t_30);
22272  PyTuple_SET_ITEM(__pyx_t_57, 34+__pyx_t_56, __pyx_t_30);
22273  __Pyx_GIVEREF(__pyx_t_38);
22274  PyTuple_SET_ITEM(__pyx_t_57, 35+__pyx_t_56, __pyx_t_38);
22275  __Pyx_GIVEREF(__pyx_t_40);
22276  PyTuple_SET_ITEM(__pyx_t_57, 36+__pyx_t_56, __pyx_t_40);
22277  __Pyx_GIVEREF(__pyx_t_41);
22278  PyTuple_SET_ITEM(__pyx_t_57, 37+__pyx_t_56, __pyx_t_41);
22279  __Pyx_INCREF(__pyx_v_r);
22280  __Pyx_GIVEREF(__pyx_v_r);
22281  PyTuple_SET_ITEM(__pyx_t_57, 38+__pyx_t_56, __pyx_v_r);
22282  __Pyx_GIVEREF(__pyx_t_42);
22283  PyTuple_SET_ITEM(__pyx_t_57, 39+__pyx_t_56, __pyx_t_42);
22284  __Pyx_GIVEREF(__pyx_t_43);
22285  PyTuple_SET_ITEM(__pyx_t_57, 40+__pyx_t_56, __pyx_t_43);
22286  __Pyx_GIVEREF(__pyx_t_44);
22287  PyTuple_SET_ITEM(__pyx_t_57, 41+__pyx_t_56, __pyx_t_44);
22288  __Pyx_GIVEREF(__pyx_t_45);
22289  PyTuple_SET_ITEM(__pyx_t_57, 42+__pyx_t_56, __pyx_t_45);
22290  __Pyx_GIVEREF(__pyx_t_46);
22291  PyTuple_SET_ITEM(__pyx_t_57, 43+__pyx_t_56, __pyx_t_46);
22292  __Pyx_GIVEREF(__pyx_t_47);
22293  PyTuple_SET_ITEM(__pyx_t_57, 44+__pyx_t_56, __pyx_t_47);
22294  __Pyx_GIVEREF(__pyx_t_39);
22295  PyTuple_SET_ITEM(__pyx_t_57, 45+__pyx_t_56, __pyx_t_39);
22296  __Pyx_GIVEREF(__pyx_t_48);
22297  PyTuple_SET_ITEM(__pyx_t_57, 46+__pyx_t_56, __pyx_t_48);
22298  __Pyx_GIVEREF(__pyx_t_50);
22299  PyTuple_SET_ITEM(__pyx_t_57, 47+__pyx_t_56, __pyx_t_50);
22300  __Pyx_GIVEREF(__pyx_t_51);
22301  PyTuple_SET_ITEM(__pyx_t_57, 48+__pyx_t_56, __pyx_t_51);
22302  __Pyx_GIVEREF(__pyx_t_52);
22303  PyTuple_SET_ITEM(__pyx_t_57, 49+__pyx_t_56, __pyx_t_52);
22304  __Pyx_GIVEREF(__pyx_t_53);
22305  PyTuple_SET_ITEM(__pyx_t_57, 50+__pyx_t_56, __pyx_t_53);
22306  __Pyx_GIVEREF(__pyx_t_54);
22307  PyTuple_SET_ITEM(__pyx_t_57, 51+__pyx_t_56, __pyx_t_54);
22308  __Pyx_GIVEREF(__pyx_t_55);
22309  PyTuple_SET_ITEM(__pyx_t_57, 52+__pyx_t_56, __pyx_t_55);
22310  __pyx_t_2 = 0;
22311  __pyx_t_3 = 0;
22312  __pyx_t_6 = 0;
22313  __pyx_t_7 = 0;
22314  __pyx_t_8 = 0;
22315  __pyx_t_9 = 0;
22316  __pyx_t_10 = 0;
22317  __pyx_t_11 = 0;
22318  __pyx_t_12 = 0;
22319  __pyx_t_13 = 0;
22320  __pyx_t_14 = 0;
22321  __pyx_t_15 = 0;
22322  __pyx_t_16 = 0;
22323  __pyx_t_17 = 0;
22324  __pyx_t_18 = 0;
22325  __pyx_t_5 = 0;
22326  __pyx_t_19 = 0;
22327  __pyx_t_21 = 0;
22328  __pyx_t_22 = 0;
22329  __pyx_t_23 = 0;
22330  __pyx_t_24 = 0;
22331  __pyx_t_25 = 0;
22332  __pyx_t_20 = 0;
22333  __pyx_t_26 = 0;
22334  __pyx_t_28 = 0;
22335  __pyx_t_27 = 0;
22336  __pyx_t_29 = 0;
22337  __pyx_t_31 = 0;
22338  __pyx_t_32 = 0;
22339  __pyx_t_33 = 0;
22340  __pyx_t_34 = 0;
22341  __pyx_t_35 = 0;
22342  __pyx_t_36 = 0;
22343  __pyx_t_37 = 0;
22344  __pyx_t_30 = 0;
22345  __pyx_t_38 = 0;
22346  __pyx_t_40 = 0;
22347  __pyx_t_41 = 0;
22348  __pyx_t_42 = 0;
22349  __pyx_t_43 = 0;
22350  __pyx_t_44 = 0;
22351  __pyx_t_45 = 0;
22352  __pyx_t_46 = 0;
22353  __pyx_t_47 = 0;
22354  __pyx_t_39 = 0;
22355  __pyx_t_48 = 0;
22356  __pyx_t_50 = 0;
22357  __pyx_t_51 = 0;
22358  __pyx_t_52 = 0;
22359  __pyx_t_53 = 0;
22360  __pyx_t_54 = 0;
22361  __pyx_t_55 = 0;
22362  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
22363  __Pyx_GOTREF(__pyx_t_1);
22364  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22365  }
22366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22367  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22368 
22369  /* "ADR.pyx":1005
22370  * self.ebqe['penalty'],
22371  * self.numericalFlux.boundaryAdjoint_sigma)
22372  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
22373  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22374  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22375  */
22376  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
22377  __Pyx_GOTREF(__pyx_t_1);
22378  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)
22379  __Pyx_GOTREF(__pyx_t_4);
22380  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_level, __pyx_int_9) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
22381  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_data, __pyx_v_r) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
22382  __pyx_t_57 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__72, __pyx_t_4); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1005, __pyx_L1_error)
22383  __Pyx_GOTREF(__pyx_t_57);
22384  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22385  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22386  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22387 
22388  /* "ADR.pyx":1006
22389  * self.numericalFlux.boundaryAdjoint_sigma)
22390  * log("Global residual",level=9,data=r)
22391  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned]))) # <<<<<<<<<<<<<<
22392  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22393  * self.nonlinear_function_evaluations += 1
22394  */
22395  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_fabs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
22396  __Pyx_GOTREF(__pyx_t_4);
22397  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_flat); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1006, __pyx_L1_error)
22398  __Pyx_GOTREF(__pyx_t_55);
22399  __pyx_t_54 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22400  __Pyx_GOTREF(__pyx_t_54);
22401  __pyx_t_53 = __Pyx_PyObject_GetAttrStr(__pyx_t_54, __pyx_n_s_nElements_owned); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1006, __pyx_L1_error)
22402  __Pyx_GOTREF(__pyx_t_53);
22403  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22404  __pyx_t_54 = __Pyx_PyObject_GetSlice(__pyx_t_55, 0, 0, NULL, &__pyx_t_53, NULL, 0, 0, 1); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22405  __Pyx_GOTREF(__pyx_t_54);
22406  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
22407  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22408  __pyx_t_53 = PyTuple_New(1); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1006, __pyx_L1_error)
22409  __Pyx_GOTREF(__pyx_t_53);
22410  __Pyx_GIVEREF(__pyx_t_54);
22411  PyTuple_SET_ITEM(__pyx_t_53, 0, __pyx_t_54);
22412  __pyx_t_54 = 0;
22413  __pyx_t_54 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_53, NULL); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1006, __pyx_L1_error)
22414  __Pyx_GOTREF(__pyx_t_54);
22415  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22416  __Pyx_INCREF(__pyx_v_globalSum);
22417  __pyx_t_53 = __pyx_v_globalSum; __pyx_t_55 = NULL;
22418  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_53))) {
22419  __pyx_t_55 = PyMethod_GET_SELF(__pyx_t_53);
22420  if (likely(__pyx_t_55)) {
22421  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_53);
22422  __Pyx_INCREF(__pyx_t_55);
22423  __Pyx_INCREF(function);
22424  __Pyx_DECREF_SET(__pyx_t_53, function);
22425  }
22426  }
22427  if (!__pyx_t_55) {
22428  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_53, __pyx_t_54); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22429  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22430  __Pyx_GOTREF(__pyx_t_1);
22431  } else {
22432  #if CYTHON_FAST_PYCALL
22433  if (PyFunction_Check(__pyx_t_53)) {
22434  PyObject *__pyx_temp[2] = {__pyx_t_55, __pyx_t_54};
22435  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_53, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22436  __Pyx_XDECREF(__pyx_t_55); __pyx_t_55 = 0;
22437  __Pyx_GOTREF(__pyx_t_1);
22438  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22439  } else
22440  #endif
22441  #if CYTHON_FAST_PYCCALL
22442  if (__Pyx_PyFastCFunction_Check(__pyx_t_53)) {
22443  PyObject *__pyx_temp[2] = {__pyx_t_55, __pyx_t_54};
22444  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_53, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22445  __Pyx_XDECREF(__pyx_t_55); __pyx_t_55 = 0;
22446  __Pyx_GOTREF(__pyx_t_1);
22447  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
22448  } else
22449  #endif
22450  {
22451  __pyx_t_52 = PyTuple_New(1+1); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1006, __pyx_L1_error)
22452  __Pyx_GOTREF(__pyx_t_52);
22453  __Pyx_GIVEREF(__pyx_t_55); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_55); __pyx_t_55 = NULL;
22454  __Pyx_GIVEREF(__pyx_t_54);
22455  PyTuple_SET_ITEM(__pyx_t_52, 0+1, __pyx_t_54);
22456  __pyx_t_54 = 0;
22457  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_53, __pyx_t_52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
22458  __Pyx_GOTREF(__pyx_t_1);
22459  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22460  }
22461  }
22462  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
22463  __pyx_t_53 = NULL;
22464  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
22465  __pyx_t_53 = PyMethod_GET_SELF(__pyx_t_4);
22466  if (likely(__pyx_t_53)) {
22467  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22468  __Pyx_INCREF(__pyx_t_53);
22469  __Pyx_INCREF(function);
22470  __Pyx_DECREF_SET(__pyx_t_4, function);
22471  }
22472  }
22473  if (!__pyx_t_53) {
22474  __pyx_t_57 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22475  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22476  __Pyx_GOTREF(__pyx_t_57);
22477  } else {
22478  #if CYTHON_FAST_PYCALL
22479  if (PyFunction_Check(__pyx_t_4)) {
22480  PyObject *__pyx_temp[2] = {__pyx_t_53, __pyx_t_1};
22481  __pyx_t_57 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22482  __Pyx_XDECREF(__pyx_t_53); __pyx_t_53 = 0;
22483  __Pyx_GOTREF(__pyx_t_57);
22484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22485  } else
22486  #endif
22487  #if CYTHON_FAST_PYCCALL
22488  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
22489  PyObject *__pyx_temp[2] = {__pyx_t_53, __pyx_t_1};
22490  __pyx_t_57 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22491  __Pyx_XDECREF(__pyx_t_53); __pyx_t_53 = 0;
22492  __Pyx_GOTREF(__pyx_t_57);
22493  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22494  } else
22495  #endif
22496  {
22497  __pyx_t_52 = PyTuple_New(1+1); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1006, __pyx_L1_error)
22498  __Pyx_GOTREF(__pyx_t_52);
22499  __Pyx_GIVEREF(__pyx_t_53); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_53); __pyx_t_53 = NULL;
22500  __Pyx_GIVEREF(__pyx_t_1);
22501  PyTuple_SET_ITEM(__pyx_t_52, 0+1, __pyx_t_1);
22502  __pyx_t_1 = 0;
22503  __pyx_t_57 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_52, NULL); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1006, __pyx_L1_error)
22504  __Pyx_GOTREF(__pyx_t_57);
22505  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22506  }
22507  }
22508  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22509  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
22510  __Pyx_GOTREF(__pyx_t_4);
22511  if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_massConservationError, __pyx_t_57) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
22512  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22513  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22514 
22515  /* "ADR.pyx":1007
22516  * log("Global residual",level=9,data=r)
22517  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22518  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
22519  * self.nonlinear_function_evaluations += 1
22520  * def getJacobian(self,jacobian):
22521  */
22522  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1007, __pyx_L1_error)
22523  __Pyx_GOTREF(__pyx_t_4);
22524  __pyx_t_57 = PyDict_New(); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1007, __pyx_L1_error)
22525  __Pyx_GOTREF(__pyx_t_57);
22526  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_level, __pyx_int_3) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
22527  __pyx_t_52 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1007, __pyx_L1_error)
22528  __Pyx_GOTREF(__pyx_t_52);
22529  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_52, __pyx_n_s_massConservationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
22530  __Pyx_GOTREF(__pyx_t_1);
22531  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
22532  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_data, __pyx_t_1) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
22533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22534  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__73, __pyx_t_57); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
22535  __Pyx_GOTREF(__pyx_t_1);
22536  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22537  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22538  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22539 
22540  /* "ADR.pyx":1008
22541  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
22542  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22543  * self.nonlinear_function_evaluations += 1 # <<<<<<<<<<<<<<
22544  * def getJacobian(self,jacobian):
22545  * #import superluWrappers
22546  */
22547  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
22548  __Pyx_GOTREF(__pyx_t_1);
22549  __pyx_t_57 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1008, __pyx_L1_error)
22550  __Pyx_GOTREF(__pyx_t_57);
22551  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22552  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations, __pyx_t_57) < 0) __PYX_ERR(0, 1008, __pyx_L1_error)
22553  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
22554 
22555  /* "ADR.pyx":936
22556  * def calculateCoefficients(self):
22557  * pass
22558  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
22559  * import pdb
22560  * import copy
22561  */
22562 
22563  /* function exit code */
22564  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22565  goto __pyx_L0;
22566  __pyx_L1_error:;
22567  __Pyx_XDECREF(__pyx_t_1);
22568  __Pyx_XDECREF(__pyx_t_2);
22569  __Pyx_XDECREF(__pyx_t_3);
22570  __Pyx_XDECREF(__pyx_t_4);
22571  __Pyx_XDECREF(__pyx_t_5);
22572  __Pyx_XDECREF(__pyx_t_6);
22573  __Pyx_XDECREF(__pyx_t_7);
22574  __Pyx_XDECREF(__pyx_t_8);
22575  __Pyx_XDECREF(__pyx_t_9);
22576  __Pyx_XDECREF(__pyx_t_10);
22577  __Pyx_XDECREF(__pyx_t_11);
22578  __Pyx_XDECREF(__pyx_t_12);
22579  __Pyx_XDECREF(__pyx_t_13);
22580  __Pyx_XDECREF(__pyx_t_14);
22581  __Pyx_XDECREF(__pyx_t_15);
22582  __Pyx_XDECREF(__pyx_t_16);
22583  __Pyx_XDECREF(__pyx_t_17);
22584  __Pyx_XDECREF(__pyx_t_18);
22585  __Pyx_XDECREF(__pyx_t_19);
22586  __Pyx_XDECREF(__pyx_t_20);
22587  __Pyx_XDECREF(__pyx_t_21);
22588  __Pyx_XDECREF(__pyx_t_22);
22589  __Pyx_XDECREF(__pyx_t_23);
22590  __Pyx_XDECREF(__pyx_t_24);
22591  __Pyx_XDECREF(__pyx_t_25);
22592  __Pyx_XDECREF(__pyx_t_26);
22593  __Pyx_XDECREF(__pyx_t_27);
22594  __Pyx_XDECREF(__pyx_t_28);
22595  __Pyx_XDECREF(__pyx_t_29);
22596  __Pyx_XDECREF(__pyx_t_30);
22597  __Pyx_XDECREF(__pyx_t_31);
22598  __Pyx_XDECREF(__pyx_t_32);
22599  __Pyx_XDECREF(__pyx_t_33);
22600  __Pyx_XDECREF(__pyx_t_34);
22601  __Pyx_XDECREF(__pyx_t_35);
22602  __Pyx_XDECREF(__pyx_t_36);
22603  __Pyx_XDECREF(__pyx_t_37);
22604  __Pyx_XDECREF(__pyx_t_38);
22605  __Pyx_XDECREF(__pyx_t_39);
22606  __Pyx_XDECREF(__pyx_t_40);
22607  __Pyx_XDECREF(__pyx_t_41);
22608  __Pyx_XDECREF(__pyx_t_42);
22609  __Pyx_XDECREF(__pyx_t_43);
22610  __Pyx_XDECREF(__pyx_t_44);
22611  __Pyx_XDECREF(__pyx_t_45);
22612  __Pyx_XDECREF(__pyx_t_46);
22613  __Pyx_XDECREF(__pyx_t_47);
22614  __Pyx_XDECREF(__pyx_t_48);
22615  __Pyx_XDECREF(__pyx_t_49);
22616  __Pyx_XDECREF(__pyx_t_50);
22617  __Pyx_XDECREF(__pyx_t_51);
22618  __Pyx_XDECREF(__pyx_t_52);
22619  __Pyx_XDECREF(__pyx_t_53);
22620  __Pyx_XDECREF(__pyx_t_54);
22621  __Pyx_XDECREF(__pyx_t_55);
22622  __Pyx_XDECREF(__pyx_t_57);
22623  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
22624  __pyx_r = NULL;
22625  __pyx_L0:;
22626  __Pyx_XDECREF(__pyx_v_pdb);
22627  __Pyx_XDECREF(__pyx_v_copy);
22628  __Pyx_XDECREF(__pyx_v_globalSum);
22629  __Pyx_XGIVEREF(__pyx_r);
22630  __Pyx_RefNannyFinishContext();
22631  return __pyx_r;
22632 }
22633 
22634 /* "ADR.pyx":1009
22635  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22636  * self.nonlinear_function_evaluations += 1
22637  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
22638  * #import superluWrappers
22639  * #import numpy
22640  */
22641 
22642 /* Python wrapper */
22643 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22644 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_7getJacobian = {"getJacobian", (PyCFunction)__pyx_pw_3ADR_10LevelModel_7getJacobian, METH_VARARGS|METH_KEYWORDS, 0};
22645 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22646  PyObject *__pyx_v_self = 0;
22647  PyObject *__pyx_v_jacobian = 0;
22648  PyObject *__pyx_r = 0;
22649  __Pyx_RefNannyDeclarations
22650  __Pyx_RefNannySetupContext("getJacobian (wrapper)", 0);
22651  {
22652  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_jacobian,0};
22653  PyObject* values[2] = {0,0};
22654  if (unlikely(__pyx_kwds)) {
22655  Py_ssize_t kw_args;
22656  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22657  switch (pos_args) {
22658  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22659  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22660  case 0: break;
22661  default: goto __pyx_L5_argtuple_error;
22662  }
22663  kw_args = PyDict_Size(__pyx_kwds);
22664  switch (pos_args) {
22665  case 0:
22666  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
22667  else goto __pyx_L5_argtuple_error;
22668  case 1:
22669  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--;
22670  else {
22671  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, 1); __PYX_ERR(0, 1009, __pyx_L3_error)
22672  }
22673  }
22674  if (unlikely(kw_args > 0)) {
22675  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getJacobian") < 0)) __PYX_ERR(0, 1009, __pyx_L3_error)
22676  }
22677  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22678  goto __pyx_L5_argtuple_error;
22679  } else {
22680  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22681  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22682  }
22683  __pyx_v_self = values[0];
22684  __pyx_v_jacobian = values[1];
22685  }
22686  goto __pyx_L4_argument_unpacking_done;
22687  __pyx_L5_argtuple_error:;
22688  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1009, __pyx_L3_error)
22689  __pyx_L3_error:;
22690  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
22691  __Pyx_RefNannyFinishContext();
22692  return NULL;
22693  __pyx_L4_argument_unpacking_done:;
22694  __pyx_r = __pyx_pf_3ADR_10LevelModel_6getJacobian(__pyx_self, __pyx_v_self, __pyx_v_jacobian);
22695 
22696  /* function exit code */
22697  __Pyx_RefNannyFinishContext();
22698  return __pyx_r;
22699 }
22700 
22701 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian) {
22702  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
22703  PyObject *__pyx_r = NULL;
22704  __Pyx_RefNannyDeclarations
22705  PyObject *__pyx_t_1 = NULL;
22706  PyObject *__pyx_t_2 = NULL;
22707  PyObject *__pyx_t_3 = NULL;
22708  PyObject *__pyx_t_4 = NULL;
22709  int __pyx_t_5;
22710  PyObject *__pyx_t_6 = NULL;
22711  PyObject *__pyx_t_7 = NULL;
22712  PyObject *__pyx_t_8 = NULL;
22713  PyObject *__pyx_t_9 = NULL;
22714  PyObject *__pyx_t_10 = NULL;
22715  PyObject *__pyx_t_11 = NULL;
22716  PyObject *__pyx_t_12 = NULL;
22717  PyObject *__pyx_t_13 = NULL;
22718  PyObject *__pyx_t_14 = NULL;
22719  PyObject *__pyx_t_15 = NULL;
22720  PyObject *__pyx_t_16 = NULL;
22721  PyObject *__pyx_t_17 = NULL;
22722  PyObject *__pyx_t_18 = NULL;
22723  PyObject *__pyx_t_19 = NULL;
22724  PyObject *__pyx_t_20 = NULL;
22725  PyObject *__pyx_t_21 = NULL;
22726  PyObject *__pyx_t_22 = NULL;
22727  PyObject *__pyx_t_23 = NULL;
22728  PyObject *__pyx_t_24 = NULL;
22729  PyObject *__pyx_t_25 = NULL;
22730  PyObject *__pyx_t_26 = NULL;
22731  PyObject *__pyx_t_27 = NULL;
22732  PyObject *__pyx_t_28 = NULL;
22733  PyObject *__pyx_t_29 = NULL;
22734  PyObject *__pyx_t_30 = NULL;
22735  PyObject *__pyx_t_31 = NULL;
22736  PyObject *__pyx_t_32 = NULL;
22737  PyObject *__pyx_t_33 = NULL;
22738  PyObject *__pyx_t_34 = NULL;
22739  PyObject *__pyx_t_35 = NULL;
22740  PyObject *__pyx_t_36 = NULL;
22741  PyObject *__pyx_t_37 = NULL;
22742  PyObject *__pyx_t_38 = NULL;
22743  PyObject *__pyx_t_39 = NULL;
22744  PyObject *__pyx_t_40 = NULL;
22745  PyObject *__pyx_t_41 = NULL;
22746  PyObject *__pyx_t_42 = NULL;
22747  PyObject *__pyx_t_43 = NULL;
22748  PyObject *__pyx_t_44 = NULL;
22749  PyObject *__pyx_t_45 = NULL;
22750  PyObject *__pyx_t_46 = NULL;
22751  PyObject *__pyx_t_47 = NULL;
22752  PyObject *__pyx_t_48 = NULL;
22753  PyObject *__pyx_t_49 = NULL;
22754  PyObject *__pyx_t_50 = NULL;
22755  PyObject *__pyx_t_51 = NULL;
22756  PyObject *__pyx_t_52 = NULL;
22757  PyObject *__pyx_t_53 = NULL;
22758  PyObject *__pyx_t_54 = NULL;
22759  PyObject *__pyx_t_55 = NULL;
22760  PyObject *__pyx_t_56 = NULL;
22761  PyObject *__pyx_t_57 = NULL;
22762  PyObject *__pyx_t_58 = NULL;
22763  __Pyx_RefNannySetupContext("getJacobian", 0);
22764 
22765  /* "ADR.pyx":1012
22766  * #import superluWrappers
22767  * #import numpy
22768  * import pdb # <<<<<<<<<<<<<<
22769  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22770  * self.adr.calculateJacobian(#element
22771  */
22772  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
22773  __Pyx_GOTREF(__pyx_t_1);
22774  __pyx_v_pdb = __pyx_t_1;
22775  __pyx_t_1 = 0;
22776 
22777  /* "ADR.pyx":1013
22778  * #import numpy
22779  * import pdb
22780  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian) # <<<<<<<<<<<<<<
22781  * self.adr.calculateJacobian(#element
22782  * self.u[0].femSpace.elementMaps.psi,
22783  */
22784  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
22785  __Pyx_GOTREF(__pyx_t_2);
22786  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeroJacobian_CSR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
22787  __Pyx_GOTREF(__pyx_t_3);
22788  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22789  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNonzerosInJacobian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
22790  __Pyx_GOTREF(__pyx_t_2);
22791  __pyx_t_4 = NULL;
22792  __pyx_t_5 = 0;
22793  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
22794  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22795  if (likely(__pyx_t_4)) {
22796  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22797  __Pyx_INCREF(__pyx_t_4);
22798  __Pyx_INCREF(function);
22799  __Pyx_DECREF_SET(__pyx_t_3, function);
22800  __pyx_t_5 = 1;
22801  }
22802  }
22803  #if CYTHON_FAST_PYCALL
22804  if (PyFunction_Check(__pyx_t_3)) {
22805  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22806  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22807  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22808  __Pyx_GOTREF(__pyx_t_1);
22809  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22810  } else
22811  #endif
22812  #if CYTHON_FAST_PYCCALL
22813  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
22814  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22815  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22816  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22817  __Pyx_GOTREF(__pyx_t_1);
22818  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22819  } else
22820  #endif
22821  {
22822  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error)
22823  __Pyx_GOTREF(__pyx_t_6);
22824  if (__pyx_t_4) {
22825  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
22826  }
22827  __Pyx_GIVEREF(__pyx_t_2);
22828  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
22829  __Pyx_INCREF(__pyx_v_jacobian);
22830  __Pyx_GIVEREF(__pyx_v_jacobian);
22831  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_jacobian);
22832  __pyx_t_2 = 0;
22833  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
22834  __Pyx_GOTREF(__pyx_t_1);
22835  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22836  }
22837  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22838  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22839 
22840  /* "ADR.pyx":1014
22841  * import pdb
22842  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22843  * self.adr.calculateJacobian(#element # <<<<<<<<<<<<<<
22844  * self.u[0].femSpace.elementMaps.psi,
22845  * self.u[0].femSpace.elementMaps.grad_psi,
22846  */
22847  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
22848  __Pyx_GOTREF(__pyx_t_3);
22849  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_calculateJacobian); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error)
22850  __Pyx_GOTREF(__pyx_t_6);
22851  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22852 
22853  /* "ADR.pyx":1015
22854  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22855  * self.adr.calculateJacobian(#element
22856  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
22857  * self.u[0].femSpace.elementMaps.grad_psi,
22858  * self.mesh.nodeArray,
22859  */
22860  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22861  __Pyx_GOTREF(__pyx_t_3);
22862  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
22863  __Pyx_GOTREF(__pyx_t_2);
22864  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22865  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22866  __Pyx_GOTREF(__pyx_t_3);
22867  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22868  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)
22869  __Pyx_GOTREF(__pyx_t_2);
22870  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22871  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_psi); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
22872  __Pyx_GOTREF(__pyx_t_3);
22873  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22874 
22875  /* "ADR.pyx":1016
22876  * self.adr.calculateJacobian(#element
22877  * self.u[0].femSpace.elementMaps.psi,
22878  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
22879  * self.mesh.nodeArray,
22880  * self.mesh.elementNodesArray,
22881  */
22882  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22883  __Pyx_GOTREF(__pyx_t_2);
22884  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
22885  __Pyx_GOTREF(__pyx_t_4);
22886  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22887  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22888  __Pyx_GOTREF(__pyx_t_2);
22889  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22890  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
22891  __Pyx_GOTREF(__pyx_t_4);
22892  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22893  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
22894  __Pyx_GOTREF(__pyx_t_2);
22895  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22896 
22897  /* "ADR.pyx":1017
22898  * self.u[0].femSpace.elementMaps.psi,
22899  * self.u[0].femSpace.elementMaps.grad_psi,
22900  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
22901  * self.mesh.elementNodesArray,
22902  * self.elementQuadratureWeights[('u',0)],
22903  */
22904  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
22905  __Pyx_GOTREF(__pyx_t_4);
22906  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1017, __pyx_L1_error)
22907  __Pyx_GOTREF(__pyx_t_7);
22908  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22909 
22910  /* "ADR.pyx":1018
22911  * self.u[0].femSpace.elementMaps.grad_psi,
22912  * self.mesh.nodeArray,
22913  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
22914  * self.elementQuadratureWeights[('u',0)],
22915  * self.u[0].femSpace.psi,
22916  */
22917  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error)
22918  __Pyx_GOTREF(__pyx_t_4);
22919  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error)
22920  __Pyx_GOTREF(__pyx_t_8);
22921  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22922 
22923  /* "ADR.pyx":1019
22924  * self.mesh.nodeArray,
22925  * self.mesh.elementNodesArray,
22926  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
22927  * self.u[0].femSpace.psi,
22928  * self.u[0].femSpace.grad_psi,
22929  */
22930  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
22931  __Pyx_GOTREF(__pyx_t_4);
22932  __pyx_t_9 = PyObject_GetItem(__pyx_t_4, __pyx_tuple__74); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1019, __pyx_L1_error)
22933  __Pyx_GOTREF(__pyx_t_9);
22934  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22935 
22936  /* "ADR.pyx":1020
22937  * self.mesh.elementNodesArray,
22938  * self.elementQuadratureWeights[('u',0)],
22939  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22940  * self.u[0].femSpace.grad_psi,
22941  * self.u[0].femSpace.psi,
22942  */
22943  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
22944  __Pyx_GOTREF(__pyx_t_4);
22945  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L1_error)
22946  __Pyx_GOTREF(__pyx_t_10);
22947  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22948  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
22949  __Pyx_GOTREF(__pyx_t_4);
22950  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22951  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L1_error)
22952  __Pyx_GOTREF(__pyx_t_10);
22953  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22954 
22955  /* "ADR.pyx":1021
22956  * self.elementQuadratureWeights[('u',0)],
22957  * self.u[0].femSpace.psi,
22958  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22959  * self.u[0].femSpace.psi,
22960  * self.u[0].femSpace.grad_psi,
22961  */
22962  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
22963  __Pyx_GOTREF(__pyx_t_4);
22964  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1021, __pyx_L1_error)
22965  __Pyx_GOTREF(__pyx_t_11);
22966  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22967  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
22968  __Pyx_GOTREF(__pyx_t_4);
22969  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22970  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1021, __pyx_L1_error)
22971  __Pyx_GOTREF(__pyx_t_11);
22972  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22973 
22974  /* "ADR.pyx":1022
22975  * self.u[0].femSpace.psi,
22976  * self.u[0].femSpace.grad_psi,
22977  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22978  * self.u[0].femSpace.grad_psi,
22979  * self.mesh.elementDiametersArray,
22980  */
22981  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
22982  __Pyx_GOTREF(__pyx_t_4);
22983  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1022, __pyx_L1_error)
22984  __Pyx_GOTREF(__pyx_t_12);
22985  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22986  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
22987  __Pyx_GOTREF(__pyx_t_4);
22988  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22989  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1022, __pyx_L1_error)
22990  __Pyx_GOTREF(__pyx_t_12);
22991  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22992 
22993  /* "ADR.pyx":1023
22994  * self.u[0].femSpace.grad_psi,
22995  * self.u[0].femSpace.psi,
22996  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22997  * self.mesh.elementDiametersArray,
22998  * self.q[('cfl',0)],
22999  */
23000  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
23001  __Pyx_GOTREF(__pyx_t_4);
23002  __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1023, __pyx_L1_error)
23003  __Pyx_GOTREF(__pyx_t_13);
23004  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23005  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
23006  __Pyx_GOTREF(__pyx_t_4);
23007  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23008  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1023, __pyx_L1_error)
23009  __Pyx_GOTREF(__pyx_t_13);
23010  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23011 
23012  /* "ADR.pyx":1024
23013  * self.u[0].femSpace.psi,
23014  * self.u[0].femSpace.grad_psi,
23015  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
23016  * self.q[('cfl',0)],
23017  * self.shockCapturing.shockCapturingFactor,
23018  */
23019  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error)
23020  __Pyx_GOTREF(__pyx_t_4);
23021  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1024, __pyx_L1_error)
23022  __Pyx_GOTREF(__pyx_t_14);
23023  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23024 
23025  /* "ADR.pyx":1025
23026  * self.u[0].femSpace.grad_psi,
23027  * self.mesh.elementDiametersArray,
23028  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
23029  * self.shockCapturing.shockCapturingFactor,
23030  * self.coefficients.sc_uref,
23031  */
23032  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error)
23033  __Pyx_GOTREF(__pyx_t_4);
23034  __pyx_t_15 = PyObject_GetItem(__pyx_t_4, __pyx_tuple__75); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1025, __pyx_L1_error)
23035  __Pyx_GOTREF(__pyx_t_15);
23036  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23037 
23038  /* "ADR.pyx":1026
23039  * self.mesh.elementDiametersArray,
23040  * self.q[('cfl',0)],
23041  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
23042  * self.coefficients.sc_uref,
23043  * self.coefficients.sc_beta,
23044  */
23045  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error)
23046  __Pyx_GOTREF(__pyx_t_4);
23047  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1026, __pyx_L1_error)
23048  __Pyx_GOTREF(__pyx_t_16);
23049  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23050 
23051  /* "ADR.pyx":1027
23052  * self.q[('cfl',0)],
23053  * self.shockCapturing.shockCapturingFactor,
23054  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
23055  * self.coefficients.sc_beta,
23056  * self.coefficients.useMetrics,
23057  */
23058  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
23059  __Pyx_GOTREF(__pyx_t_4);
23060  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1027, __pyx_L1_error)
23061  __Pyx_GOTREF(__pyx_t_17);
23062  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23063 
23064  /* "ADR.pyx":1028
23065  * self.shockCapturing.shockCapturingFactor,
23066  * self.coefficients.sc_uref,
23067  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
23068  * self.coefficients.useMetrics,
23069  * #element boundary
23070  */
23071  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
23072  __Pyx_GOTREF(__pyx_t_4);
23073  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1028, __pyx_L1_error)
23074  __Pyx_GOTREF(__pyx_t_18);
23075  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23076 
23077  /* "ADR.pyx":1029
23078  * self.coefficients.sc_uref,
23079  * self.coefficients.sc_beta,
23080  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
23081  * #element boundary
23082  * self.u[0].femSpace.elementMaps.psi_trace,
23083  */
23084  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
23085  __Pyx_GOTREF(__pyx_t_4);
23086  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1029, __pyx_L1_error)
23087  __Pyx_GOTREF(__pyx_t_19);
23088  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23089 
23090  /* "ADR.pyx":1031
23091  * self.coefficients.useMetrics,
23092  * #element boundary
23093  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
23094  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23095  * self.elementBoundaryQuadratureWeights[('u',0)],
23096  */
23097  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23098  __Pyx_GOTREF(__pyx_t_4);
23099  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1031, __pyx_L1_error)
23100  __Pyx_GOTREF(__pyx_t_20);
23101  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23102  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23103  __Pyx_GOTREF(__pyx_t_4);
23104  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23105  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1031, __pyx_L1_error)
23106  __Pyx_GOTREF(__pyx_t_20);
23107  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23108  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
23109  __Pyx_GOTREF(__pyx_t_4);
23110  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23111 
23112  /* "ADR.pyx":1032
23113  * #element boundary
23114  * self.u[0].femSpace.elementMaps.psi_trace,
23115  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
23116  * self.elementBoundaryQuadratureWeights[('u',0)],
23117  * self.u[0].femSpace.psi_trace,
23118  */
23119  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23120  __Pyx_GOTREF(__pyx_t_20);
23121  __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1032, __pyx_L1_error)
23122  __Pyx_GOTREF(__pyx_t_21);
23123  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23124  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23125  __Pyx_GOTREF(__pyx_t_20);
23126  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23127  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1032, __pyx_L1_error)
23128  __Pyx_GOTREF(__pyx_t_21);
23129  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23130  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1032, __pyx_L1_error)
23131  __Pyx_GOTREF(__pyx_t_20);
23132  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23133 
23134  /* "ADR.pyx":1033
23135  * self.u[0].femSpace.elementMaps.psi_trace,
23136  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23137  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
23138  * self.u[0].femSpace.psi_trace,
23139  * self.u[0].femSpace.grad_psi_trace,
23140  */
23141  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1033, __pyx_L1_error)
23142  __Pyx_GOTREF(__pyx_t_21);
23143  __pyx_t_22 = PyObject_GetItem(__pyx_t_21, __pyx_tuple__76); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1033, __pyx_L1_error)
23144  __Pyx_GOTREF(__pyx_t_22);
23145  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23146 
23147  /* "ADR.pyx":1034
23148  * self.u[0].femSpace.elementMaps.grad_psi_trace,
23149  * self.elementBoundaryQuadratureWeights[('u',0)],
23150  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
23151  * self.u[0].femSpace.grad_psi_trace,
23152  * self.u[0].femSpace.psi_trace,
23153  */
23154  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1034, __pyx_L1_error)
23155  __Pyx_GOTREF(__pyx_t_21);
23156  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1034, __pyx_L1_error)
23157  __Pyx_GOTREF(__pyx_t_23);
23158  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23159  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1034, __pyx_L1_error)
23160  __Pyx_GOTREF(__pyx_t_21);
23161  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23162  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1034, __pyx_L1_error)
23163  __Pyx_GOTREF(__pyx_t_23);
23164  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23165 
23166  /* "ADR.pyx":1035
23167  * self.elementBoundaryQuadratureWeights[('u',0)],
23168  * self.u[0].femSpace.psi_trace,
23169  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
23170  * self.u[0].femSpace.psi_trace,
23171  * self.u[0].femSpace.grad_psi_trace,
23172  */
23173  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1035, __pyx_L1_error)
23174  __Pyx_GOTREF(__pyx_t_21);
23175  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1035, __pyx_L1_error)
23176  __Pyx_GOTREF(__pyx_t_24);
23177  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23178  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1035, __pyx_L1_error)
23179  __Pyx_GOTREF(__pyx_t_21);
23180  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23181  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1035, __pyx_L1_error)
23182  __Pyx_GOTREF(__pyx_t_24);
23183  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23184 
23185  /* "ADR.pyx":1036
23186  * self.u[0].femSpace.psi_trace,
23187  * self.u[0].femSpace.grad_psi_trace,
23188  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
23189  * self.u[0].femSpace.grad_psi_trace,
23190  * self.u[0].femSpace.elementMaps.boundaryNormals,
23191  */
23192  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1036, __pyx_L1_error)
23193  __Pyx_GOTREF(__pyx_t_21);
23194  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1036, __pyx_L1_error)
23195  __Pyx_GOTREF(__pyx_t_25);
23196  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23197  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1036, __pyx_L1_error)
23198  __Pyx_GOTREF(__pyx_t_21);
23199  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23200  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1036, __pyx_L1_error)
23201  __Pyx_GOTREF(__pyx_t_25);
23202  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23203 
23204  /* "ADR.pyx":1037
23205  * self.u[0].femSpace.grad_psi_trace,
23206  * self.u[0].femSpace.psi_trace,
23207  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
23208  * self.u[0].femSpace.elementMaps.boundaryNormals,
23209  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23210  */
23211  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1037, __pyx_L1_error)
23212  __Pyx_GOTREF(__pyx_t_21);
23213  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1037, __pyx_L1_error)
23214  __Pyx_GOTREF(__pyx_t_26);
23215  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23216  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1037, __pyx_L1_error)
23217  __Pyx_GOTREF(__pyx_t_21);
23218  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23219  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1037, __pyx_L1_error)
23220  __Pyx_GOTREF(__pyx_t_26);
23221  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23222 
23223  /* "ADR.pyx":1038
23224  * self.u[0].femSpace.psi_trace,
23225  * self.u[0].femSpace.grad_psi_trace,
23226  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
23227  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23228  * self.mesh.nElements_global,
23229  */
23230  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23231  __Pyx_GOTREF(__pyx_t_21);
23232  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1038, __pyx_L1_error)
23233  __Pyx_GOTREF(__pyx_t_27);
23234  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23235  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23236  __Pyx_GOTREF(__pyx_t_21);
23237  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23238  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1038, __pyx_L1_error)
23239  __Pyx_GOTREF(__pyx_t_27);
23240  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23241  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1038, __pyx_L1_error)
23242  __Pyx_GOTREF(__pyx_t_21);
23243  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23244 
23245  /* "ADR.pyx":1039
23246  * self.u[0].femSpace.grad_psi_trace,
23247  * self.u[0].femSpace.elementMaps.boundaryNormals,
23248  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
23249  * self.mesh.nElements_global,
23250  * self.u[0].femSpace.dofMap.l2g,
23251  */
23252  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23253  __Pyx_GOTREF(__pyx_t_27);
23254  __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1039, __pyx_L1_error)
23255  __Pyx_GOTREF(__pyx_t_28);
23256  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23257  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23258  __Pyx_GOTREF(__pyx_t_27);
23259  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23260  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1039, __pyx_L1_error)
23261  __Pyx_GOTREF(__pyx_t_28);
23262  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23263  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1039, __pyx_L1_error)
23264  __Pyx_GOTREF(__pyx_t_27);
23265  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23266 
23267  /* "ADR.pyx":1040
23268  * self.u[0].femSpace.elementMaps.boundaryNormals,
23269  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23270  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
23271  * self.u[0].femSpace.dofMap.l2g,
23272  * self.u[0].dof,
23273  */
23274  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1040, __pyx_L1_error)
23275  __Pyx_GOTREF(__pyx_t_28);
23276  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1040, __pyx_L1_error)
23277  __Pyx_GOTREF(__pyx_t_29);
23278  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23279 
23280  /* "ADR.pyx":1041
23281  * self.u[0].femSpace.elementMaps.boundaryJacobians,
23282  * self.mesh.nElements_global,
23283  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
23284  * self.u[0].dof,
23285  * self.coefficients.sdInfo[(0,0)][0],
23286  */
23287  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23288  __Pyx_GOTREF(__pyx_t_28);
23289  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_28, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1041, __pyx_L1_error)
23290  __Pyx_GOTREF(__pyx_t_30);
23291  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23292  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23293  __Pyx_GOTREF(__pyx_t_28);
23294  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23295  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1041, __pyx_L1_error)
23296  __Pyx_GOTREF(__pyx_t_30);
23297  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23298  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_l2g); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1041, __pyx_L1_error)
23299  __Pyx_GOTREF(__pyx_t_28);
23300  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23301 
23302  /* "ADR.pyx":1042
23303  * self.mesh.nElements_global,
23304  * self.u[0].femSpace.dofMap.l2g,
23305  * self.u[0].dof, # <<<<<<<<<<<<<<
23306  * self.coefficients.sdInfo[(0,0)][0],
23307  * self.coefficients.sdInfo[(0,0)][1],
23308  */
23309  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1042, __pyx_L1_error)
23310  __Pyx_GOTREF(__pyx_t_30);
23311  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1042, __pyx_L1_error)
23312  __Pyx_GOTREF(__pyx_t_31);
23313  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23314  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_dof); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1042, __pyx_L1_error)
23315  __Pyx_GOTREF(__pyx_t_30);
23316  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23317 
23318  /* "ADR.pyx":1043
23319  * self.u[0].femSpace.dofMap.l2g,
23320  * self.u[0].dof,
23321  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
23322  * self.coefficients.sdInfo[(0,0)][1],
23323  * self.q[('a',0,0)],
23324  */
23325  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1043, __pyx_L1_error)
23326  __Pyx_GOTREF(__pyx_t_31);
23327  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1043, __pyx_L1_error)
23328  __Pyx_GOTREF(__pyx_t_32);
23329  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23330  __pyx_t_31 = PyObject_GetItem(__pyx_t_32, __pyx_tuple__77); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1043, __pyx_L1_error)
23331  __Pyx_GOTREF(__pyx_t_31);
23332  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23333  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 1043, __pyx_L1_error)
23334  __Pyx_GOTREF(__pyx_t_32);
23335  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23336 
23337  /* "ADR.pyx":1044
23338  * self.u[0].dof,
23339  * self.coefficients.sdInfo[(0,0)][0],
23340  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
23341  * self.q[('a',0,0)],
23342  * self.q[('df',0,0)],
23343  */
23344  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1044, __pyx_L1_error)
23345  __Pyx_GOTREF(__pyx_t_31);
23346  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 1044, __pyx_L1_error)
23347  __Pyx_GOTREF(__pyx_t_33);
23348  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23349  __pyx_t_31 = PyObject_GetItem(__pyx_t_33, __pyx_tuple__78); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1044, __pyx_L1_error)
23350  __Pyx_GOTREF(__pyx_t_31);
23351  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23352  __pyx_t_33 = __Pyx_GetItemInt(__pyx_t_31, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 1044, __pyx_L1_error)
23353  __Pyx_GOTREF(__pyx_t_33);
23354  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23355 
23356  /* "ADR.pyx":1045
23357  * self.coefficients.sdInfo[(0,0)][0],
23358  * self.coefficients.sdInfo[(0,0)][1],
23359  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
23360  * self.q[('df',0,0)],
23361  * self.q[('r',0)],
23362  */
23363  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1045, __pyx_L1_error)
23364  __Pyx_GOTREF(__pyx_t_31);
23365  __pyx_t_34 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__79); if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 1045, __pyx_L1_error)
23366  __Pyx_GOTREF(__pyx_t_34);
23367  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23368 
23369  /* "ADR.pyx":1046
23370  * self.coefficients.sdInfo[(0,0)][1],
23371  * self.q[('a',0,0)],
23372  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
23373  * self.q[('r',0)],
23374  * self.shockCapturing.lag,
23375  */
23376  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1046, __pyx_L1_error)
23377  __Pyx_GOTREF(__pyx_t_31);
23378  __pyx_t_35 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__80); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 1046, __pyx_L1_error)
23379  __Pyx_GOTREF(__pyx_t_35);
23380  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23381 
23382  /* "ADR.pyx":1047
23383  * self.q[('a',0,0)],
23384  * self.q[('df',0,0)],
23385  * self.q[('r',0)], # <<<<<<<<<<<<<<
23386  * self.shockCapturing.lag,
23387  * self.shockCapturing.shockCapturingFactor,
23388  */
23389  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1047, __pyx_L1_error)
23390  __Pyx_GOTREF(__pyx_t_31);
23391  __pyx_t_36 = PyObject_GetItem(__pyx_t_31, __pyx_tuple__81); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 1047, __pyx_L1_error)
23392  __Pyx_GOTREF(__pyx_t_36);
23393  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23394 
23395  /* "ADR.pyx":1048
23396  * self.q[('df',0,0)],
23397  * self.q[('r',0)],
23398  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
23399  * self.shockCapturing.shockCapturingFactor,
23400  * self.shockCapturing.numDiff[0],
23401  */
23402  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1048, __pyx_L1_error)
23403  __Pyx_GOTREF(__pyx_t_31);
23404  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_lag); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 1048, __pyx_L1_error)
23405  __Pyx_GOTREF(__pyx_t_37);
23406  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23407 
23408  /* "ADR.pyx":1049
23409  * self.q[('r',0)],
23410  * self.shockCapturing.lag,
23411  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
23412  * self.shockCapturing.numDiff[0],
23413  * self.shockCapturing.numDiff_last[0],
23414  */
23415  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1049, __pyx_L1_error)
23416  __Pyx_GOTREF(__pyx_t_31);
23417  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_38)) __PYX_ERR(0, 1049, __pyx_L1_error)
23418  __Pyx_GOTREF(__pyx_t_38);
23419  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23420 
23421  /* "ADR.pyx":1050
23422  * self.shockCapturing.lag,
23423  * self.shockCapturing.shockCapturingFactor,
23424  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
23425  * self.shockCapturing.numDiff_last[0],
23426  * self.csrRowIndeces[(0,0)],
23427  */
23428  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1050, __pyx_L1_error)
23429  __Pyx_GOTREF(__pyx_t_31);
23430  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1050, __pyx_L1_error)
23431  __Pyx_GOTREF(__pyx_t_39);
23432  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23433  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1050, __pyx_L1_error)
23434  __Pyx_GOTREF(__pyx_t_31);
23435  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23436 
23437  /* "ADR.pyx":1051
23438  * self.shockCapturing.shockCapturingFactor,
23439  * self.shockCapturing.numDiff[0],
23440  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
23441  * self.csrRowIndeces[(0,0)],
23442  * self.csrColumnOffsets[(0,0)],
23443  */
23444  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1051, __pyx_L1_error)
23445  __Pyx_GOTREF(__pyx_t_39);
23446  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1051, __pyx_L1_error)
23447  __Pyx_GOTREF(__pyx_t_40);
23448  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23449  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_40, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(0, 1051, __pyx_L1_error)
23450  __Pyx_GOTREF(__pyx_t_39);
23451  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23452 
23453  /* "ADR.pyx":1052
23454  * self.shockCapturing.numDiff[0],
23455  * self.shockCapturing.numDiff_last[0],
23456  * self.csrRowIndeces[(0,0)], # <<<<<<<<<<<<<<
23457  * self.csrColumnOffsets[(0,0)],
23458  * jacobian,
23459  */
23460  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrRowIndeces); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1052, __pyx_L1_error)
23461  __Pyx_GOTREF(__pyx_t_40);
23462  __pyx_t_41 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__82); if (unlikely(!__pyx_t_41)) __PYX_ERR(0, 1052, __pyx_L1_error)
23463  __Pyx_GOTREF(__pyx_t_41);
23464  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23465 
23466  /* "ADR.pyx":1053
23467  * self.shockCapturing.numDiff_last[0],
23468  * self.csrRowIndeces[(0,0)],
23469  * self.csrColumnOffsets[(0,0)], # <<<<<<<<<<<<<<
23470  * jacobian,
23471  * self.mesh.nExteriorElementBoundaries_global,
23472  */
23473  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1053, __pyx_L1_error)
23474  __Pyx_GOTREF(__pyx_t_40);
23475  __pyx_t_42 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__83); if (unlikely(!__pyx_t_42)) __PYX_ERR(0, 1053, __pyx_L1_error)
23476  __Pyx_GOTREF(__pyx_t_42);
23477  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23478 
23479  /* "ADR.pyx":1055
23480  * self.csrColumnOffsets[(0,0)],
23481  * jacobian,
23482  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
23483  * self.mesh.exteriorElementBoundariesArray,
23484  * self.mesh.elementBoundaryElementsArray,
23485  */
23486  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1055, __pyx_L1_error)
23487  __Pyx_GOTREF(__pyx_t_40);
23488  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_43)) __PYX_ERR(0, 1055, __pyx_L1_error)
23489  __Pyx_GOTREF(__pyx_t_43);
23490  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23491 
23492  /* "ADR.pyx":1056
23493  * jacobian,
23494  * self.mesh.nExteriorElementBoundaries_global,
23495  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
23496  * self.mesh.elementBoundaryElementsArray,
23497  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23498  */
23499  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1056, __pyx_L1_error)
23500  __Pyx_GOTREF(__pyx_t_40);
23501  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(0, 1056, __pyx_L1_error)
23502  __Pyx_GOTREF(__pyx_t_44);
23503  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23504 
23505  /* "ADR.pyx":1057
23506  * self.mesh.nExteriorElementBoundaries_global,
23507  * self.mesh.exteriorElementBoundariesArray,
23508  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
23509  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23510  * self.ebqe[('a',0,0)],
23511  */
23512  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1057, __pyx_L1_error)
23513  __Pyx_GOTREF(__pyx_t_40);
23514  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(0, 1057, __pyx_L1_error)
23515  __Pyx_GOTREF(__pyx_t_45);
23516  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23517 
23518  /* "ADR.pyx":1058
23519  * self.mesh.exteriorElementBoundariesArray,
23520  * self.mesh.elementBoundaryElementsArray,
23521  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
23522  * self.ebqe[('a',0,0)],
23523  * self.ebqe[('df',0,0)],
23524  */
23525  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1058, __pyx_L1_error)
23526  __Pyx_GOTREF(__pyx_t_40);
23527  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_46)) __PYX_ERR(0, 1058, __pyx_L1_error)
23528  __Pyx_GOTREF(__pyx_t_46);
23529  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23530 
23531  /* "ADR.pyx":1059
23532  * self.mesh.elementBoundaryElementsArray,
23533  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23534  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
23535  * self.ebqe[('df',0,0)],
23536  * self.numericalFlux.isDOFBoundary[0],
23537  */
23538  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1059, __pyx_L1_error)
23539  __Pyx_GOTREF(__pyx_t_40);
23540  __pyx_t_47 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__84); if (unlikely(!__pyx_t_47)) __PYX_ERR(0, 1059, __pyx_L1_error)
23541  __Pyx_GOTREF(__pyx_t_47);
23542  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23543 
23544  /* "ADR.pyx":1060
23545  * self.mesh.elementBoundaryLocalElementBoundariesArray,
23546  * self.ebqe[('a',0,0)],
23547  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
23548  * self.numericalFlux.isDOFBoundary[0],
23549  * self.numericalFlux.ebqe[('u',0)],
23550  */
23551  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1060, __pyx_L1_error)
23552  __Pyx_GOTREF(__pyx_t_40);
23553  __pyx_t_48 = PyObject_GetItem(__pyx_t_40, __pyx_tuple__85); if (unlikely(!__pyx_t_48)) __PYX_ERR(0, 1060, __pyx_L1_error)
23554  __Pyx_GOTREF(__pyx_t_48);
23555  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23556 
23557  /* "ADR.pyx":1061
23558  * self.ebqe[('a',0,0)],
23559  * self.ebqe[('df',0,0)],
23560  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
23561  * self.numericalFlux.ebqe[('u',0)],
23562  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23563  */
23564  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1061, __pyx_L1_error)
23565  __Pyx_GOTREF(__pyx_t_40);
23566  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1061, __pyx_L1_error)
23567  __Pyx_GOTREF(__pyx_t_49);
23568  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23569  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_49, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(0, 1061, __pyx_L1_error)
23570  __Pyx_GOTREF(__pyx_t_40);
23571  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23572 
23573  /* "ADR.pyx":1062
23574  * self.ebqe[('df',0,0)],
23575  * self.numericalFlux.isDOFBoundary[0],
23576  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
23577  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23578  * self.ebqe[('advectiveFlux_bc_flag',0)],
23579  */
23580  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1062, __pyx_L1_error)
23581  __Pyx_GOTREF(__pyx_t_49);
23582  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1062, __pyx_L1_error)
23583  __Pyx_GOTREF(__pyx_t_50);
23584  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23585  __pyx_t_49 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__86); if (unlikely(!__pyx_t_49)) __PYX_ERR(0, 1062, __pyx_L1_error)
23586  __Pyx_GOTREF(__pyx_t_49);
23587  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23588 
23589  /* "ADR.pyx":1063
23590  * self.numericalFlux.isDOFBoundary[0],
23591  * self.numericalFlux.ebqe[('u',0)],
23592  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
23593  * self.ebqe[('advectiveFlux_bc_flag',0)],
23594  * self.ebqe[('diffusiveFlux_bc',0,0)],
23595  */
23596  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1063, __pyx_L1_error)
23597  __Pyx_GOTREF(__pyx_t_50);
23598  __pyx_t_51 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__87); if (unlikely(!__pyx_t_51)) __PYX_ERR(0, 1063, __pyx_L1_error)
23599  __Pyx_GOTREF(__pyx_t_51);
23600  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23601 
23602  /* "ADR.pyx":1064
23603  * self.numericalFlux.ebqe[('u',0)],
23604  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23605  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
23606  * self.ebqe[('diffusiveFlux_bc',0,0)],
23607  * self.ebqe[('advectiveFlux_bc',0)],
23608  */
23609  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1064, __pyx_L1_error)
23610  __Pyx_GOTREF(__pyx_t_50);
23611  __pyx_t_52 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__88); if (unlikely(!__pyx_t_52)) __PYX_ERR(0, 1064, __pyx_L1_error)
23612  __Pyx_GOTREF(__pyx_t_52);
23613  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23614 
23615  /* "ADR.pyx":1065
23616  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23617  * self.ebqe[('advectiveFlux_bc_flag',0)],
23618  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
23619  * self.ebqe[('advectiveFlux_bc',0)],
23620  * self.csrColumnOffsets_eb[(0,0)],
23621  */
23622  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1065, __pyx_L1_error)
23623  __Pyx_GOTREF(__pyx_t_50);
23624  __pyx_t_53 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__89); if (unlikely(!__pyx_t_53)) __PYX_ERR(0, 1065, __pyx_L1_error)
23625  __Pyx_GOTREF(__pyx_t_53);
23626  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23627 
23628  /* "ADR.pyx":1066
23629  * self.ebqe[('advectiveFlux_bc_flag',0)],
23630  * self.ebqe[('diffusiveFlux_bc',0,0)],
23631  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
23632  * self.csrColumnOffsets_eb[(0,0)],
23633  * self.ebqe['penalty'],
23634  */
23635  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1066, __pyx_L1_error)
23636  __Pyx_GOTREF(__pyx_t_50);
23637  __pyx_t_54 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__90); if (unlikely(!__pyx_t_54)) __PYX_ERR(0, 1066, __pyx_L1_error)
23638  __Pyx_GOTREF(__pyx_t_54);
23639  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23640 
23641  /* "ADR.pyx":1067
23642  * self.ebqe[('diffusiveFlux_bc',0,0)],
23643  * self.ebqe[('advectiveFlux_bc',0)],
23644  * self.csrColumnOffsets_eb[(0,0)], # <<<<<<<<<<<<<<
23645  * self.ebqe['penalty'],
23646  * self.numericalFlux.boundaryAdjoint_sigma)
23647  */
23648  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets_eb); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1067, __pyx_L1_error)
23649  __Pyx_GOTREF(__pyx_t_50);
23650  __pyx_t_55 = PyObject_GetItem(__pyx_t_50, __pyx_tuple__91); if (unlikely(!__pyx_t_55)) __PYX_ERR(0, 1067, __pyx_L1_error)
23651  __Pyx_GOTREF(__pyx_t_55);
23652  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23653 
23654  /* "ADR.pyx":1068
23655  * self.ebqe[('advectiveFlux_bc',0)],
23656  * self.csrColumnOffsets_eb[(0,0)],
23657  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
23658  * self.numericalFlux.boundaryAdjoint_sigma)
23659  * log("Jacobian ",level=10,data=jacobian)
23660  */
23661  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1068, __pyx_L1_error)
23662  __Pyx_GOTREF(__pyx_t_50);
23663  __pyx_t_56 = PyObject_GetItem(__pyx_t_50, __pyx_n_s_penalty); if (unlikely(!__pyx_t_56)) __PYX_ERR(0, 1068, __pyx_L1_error)
23664  __Pyx_GOTREF(__pyx_t_56);
23665  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23666 
23667  /* "ADR.pyx":1069
23668  * self.csrColumnOffsets_eb[(0,0)],
23669  * self.ebqe['penalty'],
23670  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
23671  * log("Jacobian ",level=10,data=jacobian)
23672  * #mwf decide if this is reasonable for solver statistics
23673  */
23674  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_50)) __PYX_ERR(0, 1069, __pyx_L1_error)
23675  __Pyx_GOTREF(__pyx_t_50);
23676  __pyx_t_57 = __Pyx_PyObject_GetAttrStr(__pyx_t_50, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_57)) __PYX_ERR(0, 1069, __pyx_L1_error)
23677  __Pyx_GOTREF(__pyx_t_57);
23678  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23679  __pyx_t_50 = NULL;
23680  __pyx_t_5 = 0;
23681  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
23682  __pyx_t_50 = PyMethod_GET_SELF(__pyx_t_6);
23683  if (likely(__pyx_t_50)) {
23684  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
23685  __Pyx_INCREF(__pyx_t_50);
23686  __Pyx_INCREF(function);
23687  __Pyx_DECREF_SET(__pyx_t_6, function);
23688  __pyx_t_5 = 1;
23689  }
23690  }
23691  #if CYTHON_FAST_PYCALL
23692  if (PyFunction_Check(__pyx_t_6)) {
23693  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23694  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23695  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23696  __Pyx_GOTREF(__pyx_t_1);
23697  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23698  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23699  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23700  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23701  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23702  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23703  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23704  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23705  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23706  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23707  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23708  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23709  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23710  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23711  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23712  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23713  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23714  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23715  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23716  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23717  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23718  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23719  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23720  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23721  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23722  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23723  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23724  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23725  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23726  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23727  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23728  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23729  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23730  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23731  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23732  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23733  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23734  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23735  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23736  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23737  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23738  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23739  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23740  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23741  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23742  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23743  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23744  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23745  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23746  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23747  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23748  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23749  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23750  } else
23751  #endif
23752  #if CYTHON_FAST_PYCCALL
23753  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
23754  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23755  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23756  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23757  __Pyx_GOTREF(__pyx_t_1);
23758  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23759  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23760  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23761  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23762  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23763  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23764  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23765  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23766  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23767  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23768  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23769  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23770  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23771  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23772  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23773  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23774  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23775  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23776  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23777  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23778  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23779  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23780  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23781  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23782  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23783  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23784  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23785  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23786  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23787  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23788  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23789  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23790  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23791  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23792  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23793  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23794  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23795  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23796  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23797  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23798  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23799  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23800  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23801  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23802  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23803  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23804  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23805  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23806  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23807  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23808  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23809  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23810  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23811  } else
23812  #endif
23813  {
23814  __pyx_t_58 = PyTuple_New(54+__pyx_t_5); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1014, __pyx_L1_error)
23815  __Pyx_GOTREF(__pyx_t_58);
23816  if (__pyx_t_50) {
23817  __Pyx_GIVEREF(__pyx_t_50); PyTuple_SET_ITEM(__pyx_t_58, 0, __pyx_t_50); __pyx_t_50 = NULL;
23818  }
23819  __Pyx_GIVEREF(__pyx_t_3);
23820  PyTuple_SET_ITEM(__pyx_t_58, 0+__pyx_t_5, __pyx_t_3);
23821  __Pyx_GIVEREF(__pyx_t_2);
23822  PyTuple_SET_ITEM(__pyx_t_58, 1+__pyx_t_5, __pyx_t_2);
23823  __Pyx_GIVEREF(__pyx_t_7);
23824  PyTuple_SET_ITEM(__pyx_t_58, 2+__pyx_t_5, __pyx_t_7);
23825  __Pyx_GIVEREF(__pyx_t_8);
23826  PyTuple_SET_ITEM(__pyx_t_58, 3+__pyx_t_5, __pyx_t_8);
23827  __Pyx_GIVEREF(__pyx_t_9);
23828  PyTuple_SET_ITEM(__pyx_t_58, 4+__pyx_t_5, __pyx_t_9);
23829  __Pyx_GIVEREF(__pyx_t_10);
23830  PyTuple_SET_ITEM(__pyx_t_58, 5+__pyx_t_5, __pyx_t_10);
23831  __Pyx_GIVEREF(__pyx_t_11);
23832  PyTuple_SET_ITEM(__pyx_t_58, 6+__pyx_t_5, __pyx_t_11);
23833  __Pyx_GIVEREF(__pyx_t_12);
23834  PyTuple_SET_ITEM(__pyx_t_58, 7+__pyx_t_5, __pyx_t_12);
23835  __Pyx_GIVEREF(__pyx_t_13);
23836  PyTuple_SET_ITEM(__pyx_t_58, 8+__pyx_t_5, __pyx_t_13);
23837  __Pyx_GIVEREF(__pyx_t_14);
23838  PyTuple_SET_ITEM(__pyx_t_58, 9+__pyx_t_5, __pyx_t_14);
23839  __Pyx_GIVEREF(__pyx_t_15);
23840  PyTuple_SET_ITEM(__pyx_t_58, 10+__pyx_t_5, __pyx_t_15);
23841  __Pyx_GIVEREF(__pyx_t_16);
23842  PyTuple_SET_ITEM(__pyx_t_58, 11+__pyx_t_5, __pyx_t_16);
23843  __Pyx_GIVEREF(__pyx_t_17);
23844  PyTuple_SET_ITEM(__pyx_t_58, 12+__pyx_t_5, __pyx_t_17);
23845  __Pyx_GIVEREF(__pyx_t_18);
23846  PyTuple_SET_ITEM(__pyx_t_58, 13+__pyx_t_5, __pyx_t_18);
23847  __Pyx_GIVEREF(__pyx_t_19);
23848  PyTuple_SET_ITEM(__pyx_t_58, 14+__pyx_t_5, __pyx_t_19);
23849  __Pyx_GIVEREF(__pyx_t_4);
23850  PyTuple_SET_ITEM(__pyx_t_58, 15+__pyx_t_5, __pyx_t_4);
23851  __Pyx_GIVEREF(__pyx_t_20);
23852  PyTuple_SET_ITEM(__pyx_t_58, 16+__pyx_t_5, __pyx_t_20);
23853  __Pyx_GIVEREF(__pyx_t_22);
23854  PyTuple_SET_ITEM(__pyx_t_58, 17+__pyx_t_5, __pyx_t_22);
23855  __Pyx_GIVEREF(__pyx_t_23);
23856  PyTuple_SET_ITEM(__pyx_t_58, 18+__pyx_t_5, __pyx_t_23);
23857  __Pyx_GIVEREF(__pyx_t_24);
23858  PyTuple_SET_ITEM(__pyx_t_58, 19+__pyx_t_5, __pyx_t_24);
23859  __Pyx_GIVEREF(__pyx_t_25);
23860  PyTuple_SET_ITEM(__pyx_t_58, 20+__pyx_t_5, __pyx_t_25);
23861  __Pyx_GIVEREF(__pyx_t_26);
23862  PyTuple_SET_ITEM(__pyx_t_58, 21+__pyx_t_5, __pyx_t_26);
23863  __Pyx_GIVEREF(__pyx_t_21);
23864  PyTuple_SET_ITEM(__pyx_t_58, 22+__pyx_t_5, __pyx_t_21);
23865  __Pyx_GIVEREF(__pyx_t_27);
23866  PyTuple_SET_ITEM(__pyx_t_58, 23+__pyx_t_5, __pyx_t_27);
23867  __Pyx_GIVEREF(__pyx_t_29);
23868  PyTuple_SET_ITEM(__pyx_t_58, 24+__pyx_t_5, __pyx_t_29);
23869  __Pyx_GIVEREF(__pyx_t_28);
23870  PyTuple_SET_ITEM(__pyx_t_58, 25+__pyx_t_5, __pyx_t_28);
23871  __Pyx_GIVEREF(__pyx_t_30);
23872  PyTuple_SET_ITEM(__pyx_t_58, 26+__pyx_t_5, __pyx_t_30);
23873  __Pyx_GIVEREF(__pyx_t_32);
23874  PyTuple_SET_ITEM(__pyx_t_58, 27+__pyx_t_5, __pyx_t_32);
23875  __Pyx_GIVEREF(__pyx_t_33);
23876  PyTuple_SET_ITEM(__pyx_t_58, 28+__pyx_t_5, __pyx_t_33);
23877  __Pyx_GIVEREF(__pyx_t_34);
23878  PyTuple_SET_ITEM(__pyx_t_58, 29+__pyx_t_5, __pyx_t_34);
23879  __Pyx_GIVEREF(__pyx_t_35);
23880  PyTuple_SET_ITEM(__pyx_t_58, 30+__pyx_t_5, __pyx_t_35);
23881  __Pyx_GIVEREF(__pyx_t_36);
23882  PyTuple_SET_ITEM(__pyx_t_58, 31+__pyx_t_5, __pyx_t_36);
23883  __Pyx_GIVEREF(__pyx_t_37);
23884  PyTuple_SET_ITEM(__pyx_t_58, 32+__pyx_t_5, __pyx_t_37);
23885  __Pyx_GIVEREF(__pyx_t_38);
23886  PyTuple_SET_ITEM(__pyx_t_58, 33+__pyx_t_5, __pyx_t_38);
23887  __Pyx_GIVEREF(__pyx_t_31);
23888  PyTuple_SET_ITEM(__pyx_t_58, 34+__pyx_t_5, __pyx_t_31);
23889  __Pyx_GIVEREF(__pyx_t_39);
23890  PyTuple_SET_ITEM(__pyx_t_58, 35+__pyx_t_5, __pyx_t_39);
23891  __Pyx_GIVEREF(__pyx_t_41);
23892  PyTuple_SET_ITEM(__pyx_t_58, 36+__pyx_t_5, __pyx_t_41);
23893  __Pyx_GIVEREF(__pyx_t_42);
23894  PyTuple_SET_ITEM(__pyx_t_58, 37+__pyx_t_5, __pyx_t_42);
23895  __Pyx_INCREF(__pyx_v_jacobian);
23896  __Pyx_GIVEREF(__pyx_v_jacobian);
23897  PyTuple_SET_ITEM(__pyx_t_58, 38+__pyx_t_5, __pyx_v_jacobian);
23898  __Pyx_GIVEREF(__pyx_t_43);
23899  PyTuple_SET_ITEM(__pyx_t_58, 39+__pyx_t_5, __pyx_t_43);
23900  __Pyx_GIVEREF(__pyx_t_44);
23901  PyTuple_SET_ITEM(__pyx_t_58, 40+__pyx_t_5, __pyx_t_44);
23902  __Pyx_GIVEREF(__pyx_t_45);
23903  PyTuple_SET_ITEM(__pyx_t_58, 41+__pyx_t_5, __pyx_t_45);
23904  __Pyx_GIVEREF(__pyx_t_46);
23905  PyTuple_SET_ITEM(__pyx_t_58, 42+__pyx_t_5, __pyx_t_46);
23906  __Pyx_GIVEREF(__pyx_t_47);
23907  PyTuple_SET_ITEM(__pyx_t_58, 43+__pyx_t_5, __pyx_t_47);
23908  __Pyx_GIVEREF(__pyx_t_48);
23909  PyTuple_SET_ITEM(__pyx_t_58, 44+__pyx_t_5, __pyx_t_48);
23910  __Pyx_GIVEREF(__pyx_t_40);
23911  PyTuple_SET_ITEM(__pyx_t_58, 45+__pyx_t_5, __pyx_t_40);
23912  __Pyx_GIVEREF(__pyx_t_49);
23913  PyTuple_SET_ITEM(__pyx_t_58, 46+__pyx_t_5, __pyx_t_49);
23914  __Pyx_GIVEREF(__pyx_t_51);
23915  PyTuple_SET_ITEM(__pyx_t_58, 47+__pyx_t_5, __pyx_t_51);
23916  __Pyx_GIVEREF(__pyx_t_52);
23917  PyTuple_SET_ITEM(__pyx_t_58, 48+__pyx_t_5, __pyx_t_52);
23918  __Pyx_GIVEREF(__pyx_t_53);
23919  PyTuple_SET_ITEM(__pyx_t_58, 49+__pyx_t_5, __pyx_t_53);
23920  __Pyx_GIVEREF(__pyx_t_54);
23921  PyTuple_SET_ITEM(__pyx_t_58, 50+__pyx_t_5, __pyx_t_54);
23922  __Pyx_GIVEREF(__pyx_t_55);
23923  PyTuple_SET_ITEM(__pyx_t_58, 51+__pyx_t_5, __pyx_t_55);
23924  __Pyx_GIVEREF(__pyx_t_56);
23925  PyTuple_SET_ITEM(__pyx_t_58, 52+__pyx_t_5, __pyx_t_56);
23926  __Pyx_GIVEREF(__pyx_t_57);
23927  PyTuple_SET_ITEM(__pyx_t_58, 53+__pyx_t_5, __pyx_t_57);
23928  __pyx_t_3 = 0;
23929  __pyx_t_2 = 0;
23930  __pyx_t_7 = 0;
23931  __pyx_t_8 = 0;
23932  __pyx_t_9 = 0;
23933  __pyx_t_10 = 0;
23934  __pyx_t_11 = 0;
23935  __pyx_t_12 = 0;
23936  __pyx_t_13 = 0;
23937  __pyx_t_14 = 0;
23938  __pyx_t_15 = 0;
23939  __pyx_t_16 = 0;
23940  __pyx_t_17 = 0;
23941  __pyx_t_18 = 0;
23942  __pyx_t_19 = 0;
23943  __pyx_t_4 = 0;
23944  __pyx_t_20 = 0;
23945  __pyx_t_22 = 0;
23946  __pyx_t_23 = 0;
23947  __pyx_t_24 = 0;
23948  __pyx_t_25 = 0;
23949  __pyx_t_26 = 0;
23950  __pyx_t_21 = 0;
23951  __pyx_t_27 = 0;
23952  __pyx_t_29 = 0;
23953  __pyx_t_28 = 0;
23954  __pyx_t_30 = 0;
23955  __pyx_t_32 = 0;
23956  __pyx_t_33 = 0;
23957  __pyx_t_34 = 0;
23958  __pyx_t_35 = 0;
23959  __pyx_t_36 = 0;
23960  __pyx_t_37 = 0;
23961  __pyx_t_38 = 0;
23962  __pyx_t_31 = 0;
23963  __pyx_t_39 = 0;
23964  __pyx_t_41 = 0;
23965  __pyx_t_42 = 0;
23966  __pyx_t_43 = 0;
23967  __pyx_t_44 = 0;
23968  __pyx_t_45 = 0;
23969  __pyx_t_46 = 0;
23970  __pyx_t_47 = 0;
23971  __pyx_t_48 = 0;
23972  __pyx_t_40 = 0;
23973  __pyx_t_49 = 0;
23974  __pyx_t_51 = 0;
23975  __pyx_t_52 = 0;
23976  __pyx_t_53 = 0;
23977  __pyx_t_54 = 0;
23978  __pyx_t_55 = 0;
23979  __pyx_t_56 = 0;
23980  __pyx_t_57 = 0;
23981  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
23982  __Pyx_GOTREF(__pyx_t_1);
23983  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23984  }
23985  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23986  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23987 
23988  /* "ADR.pyx":1070
23989  * self.ebqe['penalty'],
23990  * self.numericalFlux.boundaryAdjoint_sigma)
23991  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
23992  * #mwf decide if this is reasonable for solver statistics
23993  * self.nonlinear_function_jacobian_evaluations += 1
23994  */
23995  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
23996  __Pyx_GOTREF(__pyx_t_1);
23997  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
23998  __Pyx_GOTREF(__pyx_t_6);
23999  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_level, __pyx_int_10) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
24000  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_jacobian) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
24001  __pyx_t_58 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__92, __pyx_t_6); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1070, __pyx_L1_error)
24002  __Pyx_GOTREF(__pyx_t_58);
24003  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24004  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24005  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
24006 
24007  /* "ADR.pyx":1072
24008  * log("Jacobian ",level=10,data=jacobian)
24009  * #mwf decide if this is reasonable for solver statistics
24010  * self.nonlinear_function_jacobian_evaluations += 1 # <<<<<<<<<<<<<<
24011  * return jacobian
24012  * def calculateElementQuadrature(self):
24013  */
24014  __pyx_t_58 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval); if (unlikely(!__pyx_t_58)) __PYX_ERR(0, 1072, __pyx_L1_error)
24015  __Pyx_GOTREF(__pyx_t_58);
24016  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_58, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L1_error)
24017  __Pyx_GOTREF(__pyx_t_6);
24018  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
24019  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval, __pyx_t_6) < 0) __PYX_ERR(0, 1072, __pyx_L1_error)
24020  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24021 
24022  /* "ADR.pyx":1073
24023  * #mwf decide if this is reasonable for solver statistics
24024  * self.nonlinear_function_jacobian_evaluations += 1
24025  * return jacobian # <<<<<<<<<<<<<<
24026  * def calculateElementQuadrature(self):
24027  * """
24028  */
24029  __Pyx_XDECREF(__pyx_r);
24030  __Pyx_INCREF(__pyx_v_jacobian);
24031  __pyx_r = __pyx_v_jacobian;
24032  goto __pyx_L0;
24033 
24034  /* "ADR.pyx":1009
24035  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
24036  * self.nonlinear_function_evaluations += 1
24037  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
24038  * #import superluWrappers
24039  * #import numpy
24040  */
24041 
24042  /* function exit code */
24043  __pyx_L1_error:;
24044  __Pyx_XDECREF(__pyx_t_1);
24045  __Pyx_XDECREF(__pyx_t_2);
24046  __Pyx_XDECREF(__pyx_t_3);
24047  __Pyx_XDECREF(__pyx_t_4);
24048  __Pyx_XDECREF(__pyx_t_6);
24049  __Pyx_XDECREF(__pyx_t_7);
24050  __Pyx_XDECREF(__pyx_t_8);
24051  __Pyx_XDECREF(__pyx_t_9);
24052  __Pyx_XDECREF(__pyx_t_10);
24053  __Pyx_XDECREF(__pyx_t_11);
24054  __Pyx_XDECREF(__pyx_t_12);
24055  __Pyx_XDECREF(__pyx_t_13);
24056  __Pyx_XDECREF(__pyx_t_14);
24057  __Pyx_XDECREF(__pyx_t_15);
24058  __Pyx_XDECREF(__pyx_t_16);
24059  __Pyx_XDECREF(__pyx_t_17);
24060  __Pyx_XDECREF(__pyx_t_18);
24061  __Pyx_XDECREF(__pyx_t_19);
24062  __Pyx_XDECREF(__pyx_t_20);
24063  __Pyx_XDECREF(__pyx_t_21);
24064  __Pyx_XDECREF(__pyx_t_22);
24065  __Pyx_XDECREF(__pyx_t_23);
24066  __Pyx_XDECREF(__pyx_t_24);
24067  __Pyx_XDECREF(__pyx_t_25);
24068  __Pyx_XDECREF(__pyx_t_26);
24069  __Pyx_XDECREF(__pyx_t_27);
24070  __Pyx_XDECREF(__pyx_t_28);
24071  __Pyx_XDECREF(__pyx_t_29);
24072  __Pyx_XDECREF(__pyx_t_30);
24073  __Pyx_XDECREF(__pyx_t_31);
24074  __Pyx_XDECREF(__pyx_t_32);
24075  __Pyx_XDECREF(__pyx_t_33);
24076  __Pyx_XDECREF(__pyx_t_34);
24077  __Pyx_XDECREF(__pyx_t_35);
24078  __Pyx_XDECREF(__pyx_t_36);
24079  __Pyx_XDECREF(__pyx_t_37);
24080  __Pyx_XDECREF(__pyx_t_38);
24081  __Pyx_XDECREF(__pyx_t_39);
24082  __Pyx_XDECREF(__pyx_t_40);
24083  __Pyx_XDECREF(__pyx_t_41);
24084  __Pyx_XDECREF(__pyx_t_42);
24085  __Pyx_XDECREF(__pyx_t_43);
24086  __Pyx_XDECREF(__pyx_t_44);
24087  __Pyx_XDECREF(__pyx_t_45);
24088  __Pyx_XDECREF(__pyx_t_46);
24089  __Pyx_XDECREF(__pyx_t_47);
24090  __Pyx_XDECREF(__pyx_t_48);
24091  __Pyx_XDECREF(__pyx_t_49);
24092  __Pyx_XDECREF(__pyx_t_50);
24093  __Pyx_XDECREF(__pyx_t_51);
24094  __Pyx_XDECREF(__pyx_t_52);
24095  __Pyx_XDECREF(__pyx_t_53);
24096  __Pyx_XDECREF(__pyx_t_54);
24097  __Pyx_XDECREF(__pyx_t_55);
24098  __Pyx_XDECREF(__pyx_t_56);
24099  __Pyx_XDECREF(__pyx_t_57);
24100  __Pyx_XDECREF(__pyx_t_58);
24101  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
24102  __pyx_r = NULL;
24103  __pyx_L0:;
24104  __Pyx_XDECREF(__pyx_v_pdb);
24105  __Pyx_XGIVEREF(__pyx_r);
24106  __Pyx_RefNannyFinishContext();
24107  return __pyx_r;
24108 }
24109 
24110 /* "ADR.pyx":1074
24111  * self.nonlinear_function_jacobian_evaluations += 1
24112  * return jacobian
24113  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
24114  * """
24115  * Calculate the physical location and weights of the quadrature rules
24116  */
24117 
24118 /* Python wrapper */
24119 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24120 static char __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature[] = "\n Calculate the physical location and weights of the quadrature rules\n and the shape information at the quadrature points.\n\n This function should be called only when the mesh changes.\n ";
24121 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature = {"calculateElementQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature, METH_O, __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature};
24122 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24123  PyObject *__pyx_r = 0;
24124  __Pyx_RefNannyDeclarations
24125  __Pyx_RefNannySetupContext("calculateElementQuadrature (wrapper)", 0);
24126  __pyx_r = __pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24127 
24128  /* function exit code */
24129  __Pyx_RefNannyFinishContext();
24130  return __pyx_r;
24131 }
24132 
24133 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
24134  PyObject *__pyx_r = NULL;
24135  __Pyx_RefNannyDeclarations
24136  PyObject *__pyx_t_1 = NULL;
24137  PyObject *__pyx_t_2 = NULL;
24138  PyObject *__pyx_t_3 = NULL;
24139  PyObject *__pyx_t_4 = NULL;
24140  PyObject *__pyx_t_5 = NULL;
24141  int __pyx_t_6;
24142  PyObject *__pyx_t_7 = NULL;
24143  int __pyx_t_8;
24144  PyObject *__pyx_t_9 = NULL;
24145  __Pyx_RefNannySetupContext("calculateElementQuadrature", 0);
24146 
24147  /* "ADR.pyx":1081
24148  * This function should be called only when the mesh changes.
24149  * """
24150  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints, # <<<<<<<<<<<<<<
24151  * self.q['x'])
24152  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24153  */
24154  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24155  __Pyx_GOTREF(__pyx_t_2);
24156  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24157  __Pyx_GOTREF(__pyx_t_3);
24158  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24159  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24160  __Pyx_GOTREF(__pyx_t_2);
24161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24162  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24163  __Pyx_GOTREF(__pyx_t_3);
24164  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24165  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
24166  __Pyx_GOTREF(__pyx_t_2);
24167  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24168  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
24169  __Pyx_GOTREF(__pyx_t_3);
24170 
24171  /* "ADR.pyx":1082
24172  * """
24173  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
24174  * self.q['x']) # <<<<<<<<<<<<<<
24175  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24176  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24177  */
24178  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error)
24179  __Pyx_GOTREF(__pyx_t_4);
24180  __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error)
24181  __Pyx_GOTREF(__pyx_t_5);
24182  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24183  __pyx_t_4 = NULL;
24184  __pyx_t_6 = 0;
24185  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24186  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24187  if (likely(__pyx_t_4)) {
24188  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24189  __Pyx_INCREF(__pyx_t_4);
24190  __Pyx_INCREF(function);
24191  __Pyx_DECREF_SET(__pyx_t_2, function);
24192  __pyx_t_6 = 1;
24193  }
24194  }
24195  #if CYTHON_FAST_PYCALL
24196  if (PyFunction_Check(__pyx_t_2)) {
24197  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24198  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24199  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24200  __Pyx_GOTREF(__pyx_t_1);
24201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24202  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24203  } else
24204  #endif
24205  #if CYTHON_FAST_PYCCALL
24206  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24207  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24208  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24209  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24210  __Pyx_GOTREF(__pyx_t_1);
24211  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24212  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24213  } else
24214  #endif
24215  {
24216  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1081, __pyx_L1_error)
24217  __Pyx_GOTREF(__pyx_t_7);
24218  if (__pyx_t_4) {
24219  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
24220  }
24221  __Pyx_GIVEREF(__pyx_t_3);
24222  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
24223  __Pyx_GIVEREF(__pyx_t_5);
24224  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
24225  __pyx_t_3 = 0;
24226  __pyx_t_5 = 0;
24227  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
24228  __Pyx_GOTREF(__pyx_t_1);
24229  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24230  }
24231  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24232  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24233 
24234  /* "ADR.pyx":1083
24235  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
24236  * self.q['x'])
24237  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24238  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24239  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24240  */
24241  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24242  __Pyx_GOTREF(__pyx_t_2);
24243  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24244  __Pyx_GOTREF(__pyx_t_7);
24245  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24246  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24247  __Pyx_GOTREF(__pyx_t_2);
24248  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24249  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24250  __Pyx_GOTREF(__pyx_t_7);
24251  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24252  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
24253  __Pyx_GOTREF(__pyx_t_2);
24254  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24255  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
24256  __Pyx_GOTREF(__pyx_t_7);
24257  __pyx_t_5 = NULL;
24258  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24259  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
24260  if (likely(__pyx_t_5)) {
24261  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24262  __Pyx_INCREF(__pyx_t_5);
24263  __Pyx_INCREF(function);
24264  __Pyx_DECREF_SET(__pyx_t_2, function);
24265  }
24266  }
24267  if (!__pyx_t_5) {
24268  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24269  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24270  __Pyx_GOTREF(__pyx_t_1);
24271  } else {
24272  #if CYTHON_FAST_PYCALL
24273  if (PyFunction_Check(__pyx_t_2)) {
24274  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
24275  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24276  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24277  __Pyx_GOTREF(__pyx_t_1);
24278  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24279  } else
24280  #endif
24281  #if CYTHON_FAST_PYCCALL
24282  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24283  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7};
24284  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24285  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24286  __Pyx_GOTREF(__pyx_t_1);
24287  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24288  } else
24289  #endif
24290  {
24291  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
24292  __Pyx_GOTREF(__pyx_t_3);
24293  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
24294  __Pyx_GIVEREF(__pyx_t_7);
24295  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_7);
24296  __pyx_t_7 = 0;
24297  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
24298  __Pyx_GOTREF(__pyx_t_1);
24299  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24300  }
24301  }
24302  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24303  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24304 
24305  /* "ADR.pyx":1084
24306  * self.q['x'])
24307  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24308  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24309  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24310  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24311  */
24312  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24313  __Pyx_GOTREF(__pyx_t_2);
24314  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24315  __Pyx_GOTREF(__pyx_t_3);
24316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24317  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24318  __Pyx_GOTREF(__pyx_t_2);
24319  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24320  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24321  __Pyx_GOTREF(__pyx_t_3);
24322  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24323  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
24324  __Pyx_GOTREF(__pyx_t_2);
24325  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24326  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
24327  __Pyx_GOTREF(__pyx_t_3);
24328  __pyx_t_7 = NULL;
24329  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24330  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
24331  if (likely(__pyx_t_7)) {
24332  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24333  __Pyx_INCREF(__pyx_t_7);
24334  __Pyx_INCREF(function);
24335  __Pyx_DECREF_SET(__pyx_t_2, function);
24336  }
24337  }
24338  if (!__pyx_t_7) {
24339  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24340  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24341  __Pyx_GOTREF(__pyx_t_1);
24342  } else {
24343  #if CYTHON_FAST_PYCALL
24344  if (PyFunction_Check(__pyx_t_2)) {
24345  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
24346  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24347  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24348  __Pyx_GOTREF(__pyx_t_1);
24349  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24350  } else
24351  #endif
24352  #if CYTHON_FAST_PYCCALL
24353  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24354  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
24355  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24356  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24357  __Pyx_GOTREF(__pyx_t_1);
24358  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24359  } else
24360  #endif
24361  {
24362  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
24363  __Pyx_GOTREF(__pyx_t_5);
24364  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
24365  __Pyx_GIVEREF(__pyx_t_3);
24366  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
24367  __pyx_t_3 = 0;
24368  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
24369  __Pyx_GOTREF(__pyx_t_1);
24370  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24371  }
24372  }
24373  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24374  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24375 
24376  /* "ADR.pyx":1085
24377  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
24378  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24379  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24380  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24381  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24382  */
24383  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24384  __Pyx_GOTREF(__pyx_t_2);
24385  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1085, __pyx_L1_error)
24386  __Pyx_GOTREF(__pyx_t_5);
24387  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24388  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24389  __Pyx_GOTREF(__pyx_t_2);
24390  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24391  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1085, __pyx_L1_error)
24392  __Pyx_GOTREF(__pyx_t_5);
24393  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24394  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
24395  __Pyx_GOTREF(__pyx_t_2);
24396  __pyx_t_3 = NULL;
24397  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24398  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
24399  if (likely(__pyx_t_3)) {
24400  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24401  __Pyx_INCREF(__pyx_t_3);
24402  __Pyx_INCREF(function);
24403  __Pyx_DECREF_SET(__pyx_t_5, function);
24404  }
24405  }
24406  if (!__pyx_t_3) {
24407  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24408  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24409  __Pyx_GOTREF(__pyx_t_1);
24410  } else {
24411  #if CYTHON_FAST_PYCALL
24412  if (PyFunction_Check(__pyx_t_5)) {
24413  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
24414  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24415  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24416  __Pyx_GOTREF(__pyx_t_1);
24417  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24418  } else
24419  #endif
24420  #if CYTHON_FAST_PYCCALL
24421  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24422  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
24423  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24424  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24425  __Pyx_GOTREF(__pyx_t_1);
24426  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24427  } else
24428  #endif
24429  {
24430  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1085, __pyx_L1_error)
24431  __Pyx_GOTREF(__pyx_t_7);
24432  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
24433  __Pyx_GIVEREF(__pyx_t_2);
24434  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
24435  __pyx_t_2 = 0;
24436  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
24437  __Pyx_GOTREF(__pyx_t_1);
24438  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24439  }
24440  }
24441  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24442  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24443 
24444  /* "ADR.pyx":1086
24445  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
24446  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24447  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
24448  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24449  * if self.stabilization != None:
24450  */
24451  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24452  __Pyx_GOTREF(__pyx_t_5);
24453  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1086, __pyx_L1_error)
24454  __Pyx_GOTREF(__pyx_t_7);
24455  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24456  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24457  __Pyx_GOTREF(__pyx_t_5);
24458  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24459  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1086, __pyx_L1_error)
24460  __Pyx_GOTREF(__pyx_t_7);
24461  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24462  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
24463  __Pyx_GOTREF(__pyx_t_5);
24464  __pyx_t_2 = NULL;
24465  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
24466  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
24467  if (likely(__pyx_t_2)) {
24468  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
24469  __Pyx_INCREF(__pyx_t_2);
24470  __Pyx_INCREF(function);
24471  __Pyx_DECREF_SET(__pyx_t_7, function);
24472  }
24473  }
24474  if (!__pyx_t_2) {
24475  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24476  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24477  __Pyx_GOTREF(__pyx_t_1);
24478  } else {
24479  #if CYTHON_FAST_PYCALL
24480  if (PyFunction_Check(__pyx_t_7)) {
24481  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
24482  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24483  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24484  __Pyx_GOTREF(__pyx_t_1);
24485  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24486  } else
24487  #endif
24488  #if CYTHON_FAST_PYCCALL
24489  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
24490  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
24491  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24492  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24493  __Pyx_GOTREF(__pyx_t_1);
24494  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24495  } else
24496  #endif
24497  {
24498  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error)
24499  __Pyx_GOTREF(__pyx_t_3);
24500  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
24501  __Pyx_GIVEREF(__pyx_t_5);
24502  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
24503  __pyx_t_5 = 0;
24504  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
24505  __Pyx_GOTREF(__pyx_t_1);
24506  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24507  }
24508  }
24509  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24510  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24511 
24512  /* "ADR.pyx":1087
24513  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
24514  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24515  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24516  * if self.stabilization != None:
24517  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24518  */
24519  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24520  __Pyx_GOTREF(__pyx_t_7);
24521  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
24522  __Pyx_GOTREF(__pyx_t_3);
24523  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24524  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24525  __Pyx_GOTREF(__pyx_t_7);
24526  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
24527  __Pyx_GOTREF(__pyx_t_5);
24528  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24529  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
24530  __Pyx_GOTREF(__pyx_t_7);
24531  __pyx_t_2 = NULL;
24532  __pyx_t_6 = 0;
24533  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24534  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
24535  if (likely(__pyx_t_2)) {
24536  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24537  __Pyx_INCREF(__pyx_t_2);
24538  __Pyx_INCREF(function);
24539  __Pyx_DECREF_SET(__pyx_t_3, function);
24540  __pyx_t_6 = 1;
24541  }
24542  }
24543  #if CYTHON_FAST_PYCALL
24544  if (PyFunction_Check(__pyx_t_3)) {
24545  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
24546  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24547  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24548  __Pyx_GOTREF(__pyx_t_1);
24549  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24550  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24551  } else
24552  #endif
24553  #if CYTHON_FAST_PYCCALL
24554  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
24555  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
24556  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24557  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24558  __Pyx_GOTREF(__pyx_t_1);
24559  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24560  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24561  } else
24562  #endif
24563  {
24564  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
24565  __Pyx_GOTREF(__pyx_t_4);
24566  if (__pyx_t_2) {
24567  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
24568  }
24569  __Pyx_GIVEREF(__pyx_t_5);
24570  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_5);
24571  __Pyx_GIVEREF(__pyx_t_7);
24572  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_7);
24573  __pyx_t_5 = 0;
24574  __pyx_t_7 = 0;
24575  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
24576  __Pyx_GOTREF(__pyx_t_1);
24577  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24578  }
24579  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24580  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24581 
24582  /* "ADR.pyx":1088
24583  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24584  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24585  * if self.stabilization != None: # <<<<<<<<<<<<<<
24586  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24587  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24588  */
24589  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
24590  __Pyx_GOTREF(__pyx_t_1);
24591  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
24592  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24593  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
24594  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24595  if (__pyx_t_8) {
24596 
24597  /* "ADR.pyx":1089
24598  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24599  * if self.stabilization != None:
24600  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24601  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24602  * if self.shockCapturing != None:
24603  */
24604  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
24605  __Pyx_GOTREF(__pyx_t_1);
24606  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1089, __pyx_L1_error)
24607  __Pyx_GOTREF(__pyx_t_4);
24608  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24609  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
24610  __Pyx_GOTREF(__pyx_t_1);
24611  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1089, __pyx_L1_error)
24612  __Pyx_GOTREF(__pyx_t_7);
24613  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1089, __pyx_L1_error)
24614  __Pyx_GOTREF(__pyx_t_5);
24615  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24616  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1089, __pyx_L1_error)
24617  __Pyx_GOTREF(__pyx_t_7);
24618  __pyx_t_2 = NULL;
24619  __pyx_t_6 = 0;
24620  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
24621  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
24622  if (likely(__pyx_t_2)) {
24623  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
24624  __Pyx_INCREF(__pyx_t_2);
24625  __Pyx_INCREF(function);
24626  __Pyx_DECREF_SET(__pyx_t_4, function);
24627  __pyx_t_6 = 1;
24628  }
24629  }
24630  #if CYTHON_FAST_PYCALL
24631  if (PyFunction_Check(__pyx_t_4)) {
24632  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_t_5, __pyx_t_7};
24633  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
24634  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24635  __Pyx_GOTREF(__pyx_t_3);
24636  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24637  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24638  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24639  } else
24640  #endif
24641  #if CYTHON_FAST_PYCCALL
24642  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
24643  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_t_5, __pyx_t_7};
24644  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
24645  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24646  __Pyx_GOTREF(__pyx_t_3);
24647  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24648  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24649  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24650  } else
24651  #endif
24652  {
24653  __pyx_t_9 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1089, __pyx_L1_error)
24654  __Pyx_GOTREF(__pyx_t_9);
24655  if (__pyx_t_2) {
24656  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
24657  }
24658  __Pyx_GIVEREF(__pyx_t_1);
24659  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_1);
24660  __Pyx_GIVEREF(__pyx_t_5);
24661  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_5);
24662  __Pyx_GIVEREF(__pyx_t_7);
24663  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_t_7);
24664  __pyx_t_1 = 0;
24665  __pyx_t_5 = 0;
24666  __pyx_t_7 = 0;
24667  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
24668  __Pyx_GOTREF(__pyx_t_3);
24669  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24670  }
24671  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24673 
24674  /* "ADR.pyx":1090
24675  * if self.stabilization != None:
24676  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24677  * self.stabilization.initializeTimeIntegration(self.timeIntegration) # <<<<<<<<<<<<<<
24678  * if self.shockCapturing != None:
24679  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24680  */
24681  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
24682  __Pyx_GOTREF(__pyx_t_4);
24683  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_initializeTimeIntegration); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1090, __pyx_L1_error)
24684  __Pyx_GOTREF(__pyx_t_9);
24685  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24686  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
24687  __Pyx_GOTREF(__pyx_t_4);
24688  __pyx_t_7 = NULL;
24689  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
24690  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
24691  if (likely(__pyx_t_7)) {
24692  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
24693  __Pyx_INCREF(__pyx_t_7);
24694  __Pyx_INCREF(function);
24695  __Pyx_DECREF_SET(__pyx_t_9, function);
24696  }
24697  }
24698  if (!__pyx_t_7) {
24699  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
24700  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24701  __Pyx_GOTREF(__pyx_t_3);
24702  } else {
24703  #if CYTHON_FAST_PYCALL
24704  if (PyFunction_Check(__pyx_t_9)) {
24705  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
24706  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
24707  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24708  __Pyx_GOTREF(__pyx_t_3);
24709  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24710  } else
24711  #endif
24712  #if CYTHON_FAST_PYCCALL
24713  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
24714  PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
24715  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
24716  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24717  __Pyx_GOTREF(__pyx_t_3);
24718  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24719  } else
24720  #endif
24721  {
24722  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1090, __pyx_L1_error)
24723  __Pyx_GOTREF(__pyx_t_5);
24724  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
24725  __Pyx_GIVEREF(__pyx_t_4);
24726  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
24727  __pyx_t_4 = 0;
24728  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
24729  __Pyx_GOTREF(__pyx_t_3);
24730  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24731  }
24732  }
24733  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24734  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24735 
24736  /* "ADR.pyx":1088
24737  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24738  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24739  * if self.stabilization != None: # <<<<<<<<<<<<<<
24740  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24741  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24742  */
24743  }
24744 
24745  /* "ADR.pyx":1091
24746  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24747  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24748  * if self.shockCapturing != None: # <<<<<<<<<<<<<<
24749  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24750  * def calculateElementBoundaryQuadrature(self):
24751  */
24752  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
24753  __Pyx_GOTREF(__pyx_t_3);
24754  __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1091, __pyx_L1_error)
24755  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24756  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1091, __pyx_L1_error)
24757  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24758  if (__pyx_t_8) {
24759 
24760  /* "ADR.pyx":1092
24761  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24762  * if self.shockCapturing != None:
24763  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24764  * def calculateElementBoundaryQuadrature(self):
24765  * pass
24766  */
24767  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
24768  __Pyx_GOTREF(__pyx_t_3);
24769  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
24770  __Pyx_GOTREF(__pyx_t_5);
24771  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24772  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
24773  __Pyx_GOTREF(__pyx_t_3);
24774  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
24775  __Pyx_GOTREF(__pyx_t_4);
24776  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
24777  __Pyx_GOTREF(__pyx_t_7);
24778  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24779  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
24780  __Pyx_GOTREF(__pyx_t_4);
24781  __pyx_t_1 = NULL;
24782  __pyx_t_6 = 0;
24783  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24784  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
24785  if (likely(__pyx_t_1)) {
24786  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24787  __Pyx_INCREF(__pyx_t_1);
24788  __Pyx_INCREF(function);
24789  __Pyx_DECREF_SET(__pyx_t_5, function);
24790  __pyx_t_6 = 1;
24791  }
24792  }
24793  #if CYTHON_FAST_PYCALL
24794  if (PyFunction_Check(__pyx_t_5)) {
24795  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_7, __pyx_t_4};
24796  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L1_error)
24797  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
24798  __Pyx_GOTREF(__pyx_t_9);
24799  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24800  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24801  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24802  } else
24803  #endif
24804  #if CYTHON_FAST_PYCCALL
24805  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24806  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_t_7, __pyx_t_4};
24807  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L1_error)
24808  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
24809  __Pyx_GOTREF(__pyx_t_9);
24810  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24811  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24812  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24813  } else
24814  #endif
24815  {
24816  __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
24817  __Pyx_GOTREF(__pyx_t_2);
24818  if (__pyx_t_1) {
24819  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
24820  }
24821  __Pyx_GIVEREF(__pyx_t_3);
24822  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
24823  __Pyx_GIVEREF(__pyx_t_7);
24824  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_t_7);
24825  __Pyx_GIVEREF(__pyx_t_4);
24826  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_t_4);
24827  __pyx_t_3 = 0;
24828  __pyx_t_7 = 0;
24829  __pyx_t_4 = 0;
24830  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L1_error)
24831  __Pyx_GOTREF(__pyx_t_9);
24832  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24833  }
24834  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24835  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24836 
24837  /* "ADR.pyx":1091
24838  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24839  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24840  * if self.shockCapturing != None: # <<<<<<<<<<<<<<
24841  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24842  * def calculateElementBoundaryQuadrature(self):
24843  */
24844  }
24845 
24846  /* "ADR.pyx":1074
24847  * self.nonlinear_function_jacobian_evaluations += 1
24848  * return jacobian
24849  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
24850  * """
24851  * Calculate the physical location and weights of the quadrature rules
24852  */
24853 
24854  /* function exit code */
24855  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24856  goto __pyx_L0;
24857  __pyx_L1_error:;
24858  __Pyx_XDECREF(__pyx_t_1);
24859  __Pyx_XDECREF(__pyx_t_2);
24860  __Pyx_XDECREF(__pyx_t_3);
24861  __Pyx_XDECREF(__pyx_t_4);
24862  __Pyx_XDECREF(__pyx_t_5);
24863  __Pyx_XDECREF(__pyx_t_7);
24864  __Pyx_XDECREF(__pyx_t_9);
24865  __Pyx_AddTraceback("ADR.LevelModel.calculateElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
24866  __pyx_r = NULL;
24867  __pyx_L0:;
24868  __Pyx_XGIVEREF(__pyx_r);
24869  __Pyx_RefNannyFinishContext();
24870  return __pyx_r;
24871 }
24872 
24873 /* "ADR.pyx":1093
24874  * if self.shockCapturing != None:
24875  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24876  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24877  * pass
24878  * def calculateExteriorElementBoundaryQuadrature(self):
24879  */
24880 
24881 /* Python wrapper */
24882 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24883 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature = {"calculateElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, METH_O, 0};
24884 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24885  PyObject *__pyx_r = 0;
24886  __Pyx_RefNannyDeclarations
24887  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature (wrapper)", 0);
24888  __pyx_r = __pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24889 
24890  /* function exit code */
24891  __Pyx_RefNannyFinishContext();
24892  return __pyx_r;
24893 }
24894 
24895 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24896  PyObject *__pyx_r = NULL;
24897  __Pyx_RefNannyDeclarations
24898  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature", 0);
24899 
24900  /* function exit code */
24901  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24902  __Pyx_XGIVEREF(__pyx_r);
24903  __Pyx_RefNannyFinishContext();
24904  return __pyx_r;
24905 }
24906 
24907 /* "ADR.pyx":1095
24908  * def calculateElementBoundaryQuadrature(self):
24909  * pass
24910  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24911  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24912  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24913  */
24914 
24915 /* Python wrapper */
24916 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24917 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature = {"calculateExteriorElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, METH_O, 0};
24918 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24919  PyObject *__pyx_r = 0;
24920  __Pyx_RefNannyDeclarations
24921  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature (wrapper)", 0);
24922  __pyx_r = __pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24923 
24924  /* function exit code */
24925  __Pyx_RefNannyFinishContext();
24926  return __pyx_r;
24927 }
24928 
24929 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
24930  PyObject *__pyx_v_cj = NULL;
24931  PyObject *__pyx_r = NULL;
24932  __Pyx_RefNannyDeclarations
24933  PyObject *__pyx_t_1 = NULL;
24934  PyObject *__pyx_t_2 = NULL;
24935  PyObject *__pyx_t_3 = NULL;
24936  PyObject *__pyx_t_4 = NULL;
24937  PyObject *__pyx_t_5 = NULL;
24938  int __pyx_t_6;
24939  PyObject *__pyx_t_7 = NULL;
24940  Py_ssize_t __pyx_t_8;
24941  PyObject *(*__pyx_t_9)(PyObject *);
24942  PyObject *__pyx_t_10 = NULL;
24943  PyObject *__pyx_t_11 = NULL;
24944  PyObject *__pyx_t_12 = NULL;
24945  PyObject *__pyx_t_13 = NULL;
24946  PyObject *__pyx_t_14 = NULL;
24947  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature", 0);
24948 
24949  /* "ADR.pyx":1096
24950  * pass
24951  * def calculateExteriorElementBoundaryQuadrature(self):
24952  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24953  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24954  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24955  */
24956  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24957  __Pyx_GOTREF(__pyx_t_2);
24958  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24959  __Pyx_GOTREF(__pyx_t_3);
24960  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24961  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24962  __Pyx_GOTREF(__pyx_t_2);
24963  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24964  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24965  __Pyx_GOTREF(__pyx_t_3);
24966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24967  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
24968  __Pyx_GOTREF(__pyx_t_2);
24969  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24970  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
24971  __Pyx_GOTREF(__pyx_t_3);
24972  __pyx_t_4 = NULL;
24973  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24974  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24975  if (likely(__pyx_t_4)) {
24976  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24977  __Pyx_INCREF(__pyx_t_4);
24978  __Pyx_INCREF(function);
24979  __Pyx_DECREF_SET(__pyx_t_2, function);
24980  }
24981  }
24982  if (!__pyx_t_4) {
24983  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
24984  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24985  __Pyx_GOTREF(__pyx_t_1);
24986  } else {
24987  #if CYTHON_FAST_PYCALL
24988  if (PyFunction_Check(__pyx_t_2)) {
24989  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
24990  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
24991  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24992  __Pyx_GOTREF(__pyx_t_1);
24993  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24994  } else
24995  #endif
24996  #if CYTHON_FAST_PYCCALL
24997  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24998  PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
24999  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
25000  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25001  __Pyx_GOTREF(__pyx_t_1);
25002  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25003  } else
25004  #endif
25005  {
25006  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error)
25007  __Pyx_GOTREF(__pyx_t_5);
25008  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
25009  __Pyx_GIVEREF(__pyx_t_3);
25010  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
25011  __pyx_t_3 = 0;
25012  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
25013  __Pyx_GOTREF(__pyx_t_1);
25014  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25015  }
25016  }
25017  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25018  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25019 
25020  /* "ADR.pyx":1097
25021  * def calculateExteriorElementBoundaryQuadrature(self):
25022  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25023  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25024  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25025  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25026  */
25027  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25028  __Pyx_GOTREF(__pyx_t_2);
25029  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25030  __Pyx_GOTREF(__pyx_t_5);
25031  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25032  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25033  __Pyx_GOTREF(__pyx_t_2);
25034  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25035  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25036  __Pyx_GOTREF(__pyx_t_5);
25037  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25038  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
25039  __Pyx_GOTREF(__pyx_t_2);
25040  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25041  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
25042  __Pyx_GOTREF(__pyx_t_5);
25043  __pyx_t_3 = NULL;
25044  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25045  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
25046  if (likely(__pyx_t_3)) {
25047  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25048  __Pyx_INCREF(__pyx_t_3);
25049  __Pyx_INCREF(function);
25050  __Pyx_DECREF_SET(__pyx_t_2, function);
25051  }
25052  }
25053  if (!__pyx_t_3) {
25054  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25055  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25056  __Pyx_GOTREF(__pyx_t_1);
25057  } else {
25058  #if CYTHON_FAST_PYCALL
25059  if (PyFunction_Check(__pyx_t_2)) {
25060  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
25061  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25062  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25063  __Pyx_GOTREF(__pyx_t_1);
25064  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25065  } else
25066  #endif
25067  #if CYTHON_FAST_PYCCALL
25068  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
25069  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
25070  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25071  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25072  __Pyx_GOTREF(__pyx_t_1);
25073  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25074  } else
25075  #endif
25076  {
25077  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
25078  __Pyx_GOTREF(__pyx_t_4);
25079  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
25080  __Pyx_GIVEREF(__pyx_t_5);
25081  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
25082  __pyx_t_5 = 0;
25083  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
25084  __Pyx_GOTREF(__pyx_t_1);
25085  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25086  }
25087  }
25088  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25089  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25090 
25091  /* "ADR.pyx":1098
25092  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25093  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25094  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25095  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25096  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25097  */
25098  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25099  __Pyx_GOTREF(__pyx_t_2);
25100  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
25101  __Pyx_GOTREF(__pyx_t_4);
25102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25103  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25104  __Pyx_GOTREF(__pyx_t_2);
25105  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25106  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
25107  __Pyx_GOTREF(__pyx_t_4);
25108  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25109  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1098, __pyx_L1_error)
25110  __Pyx_GOTREF(__pyx_t_2);
25111  __pyx_t_5 = NULL;
25112  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
25113  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
25114  if (likely(__pyx_t_5)) {
25115  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
25116  __Pyx_INCREF(__pyx_t_5);
25117  __Pyx_INCREF(function);
25118  __Pyx_DECREF_SET(__pyx_t_4, function);
25119  }
25120  }
25121  if (!__pyx_t_5) {
25122  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25123  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25124  __Pyx_GOTREF(__pyx_t_1);
25125  } else {
25126  #if CYTHON_FAST_PYCALL
25127  if (PyFunction_Check(__pyx_t_4)) {
25128  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
25129  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25130  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25131  __Pyx_GOTREF(__pyx_t_1);
25132  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25133  } else
25134  #endif
25135  #if CYTHON_FAST_PYCCALL
25136  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
25137  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
25138  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25139  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25140  __Pyx_GOTREF(__pyx_t_1);
25141  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25142  } else
25143  #endif
25144  {
25145  __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
25146  __Pyx_GOTREF(__pyx_t_3);
25147  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
25148  __Pyx_GIVEREF(__pyx_t_2);
25149  PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
25150  __pyx_t_2 = 0;
25151  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
25152  __Pyx_GOTREF(__pyx_t_1);
25153  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25154  }
25155  }
25156  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25157  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25158 
25159  /* "ADR.pyx":1099
25160  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25161  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25162  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
25163  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25164  * self.ebqe['x'])
25165  */
25166  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25167  __Pyx_GOTREF(__pyx_t_4);
25168  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
25169  __Pyx_GOTREF(__pyx_t_3);
25170  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25171  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25172  __Pyx_GOTREF(__pyx_t_4);
25173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25174  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
25175  __Pyx_GOTREF(__pyx_t_3);
25176  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25177  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
25178  __Pyx_GOTREF(__pyx_t_4);
25179  __pyx_t_2 = NULL;
25180  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25181  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
25182  if (likely(__pyx_t_2)) {
25183  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25184  __Pyx_INCREF(__pyx_t_2);
25185  __Pyx_INCREF(function);
25186  __Pyx_DECREF_SET(__pyx_t_3, function);
25187  }
25188  }
25189  if (!__pyx_t_2) {
25190  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25191  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25192  __Pyx_GOTREF(__pyx_t_1);
25193  } else {
25194  #if CYTHON_FAST_PYCALL
25195  if (PyFunction_Check(__pyx_t_3)) {
25196  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
25197  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25198  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25199  __Pyx_GOTREF(__pyx_t_1);
25200  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25201  } else
25202  #endif
25203  #if CYTHON_FAST_PYCCALL
25204  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
25205  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
25206  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25207  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25208  __Pyx_GOTREF(__pyx_t_1);
25209  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25210  } else
25211  #endif
25212  {
25213  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1099, __pyx_L1_error)
25214  __Pyx_GOTREF(__pyx_t_5);
25215  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
25216  __Pyx_GIVEREF(__pyx_t_4);
25217  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
25218  __pyx_t_4 = 0;
25219  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
25220  __Pyx_GOTREF(__pyx_t_1);
25221  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25222  }
25223  }
25224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25226 
25227  /* "ADR.pyx":1100
25228  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25229  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25230  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
25231  * self.ebqe['x'])
25232  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25233  */
25234  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25235  __Pyx_GOTREF(__pyx_t_3);
25236  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25237  __Pyx_GOTREF(__pyx_t_5);
25238  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25239  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25240  __Pyx_GOTREF(__pyx_t_3);
25241  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25242  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25243  __Pyx_GOTREF(__pyx_t_5);
25244  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25245  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getValuesGlobalExteriorTrace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
25246  __Pyx_GOTREF(__pyx_t_3);
25247  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25248  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
25249  __Pyx_GOTREF(__pyx_t_5);
25250 
25251  /* "ADR.pyx":1101
25252  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25253  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25254  * self.ebqe['x']) # <<<<<<<<<<<<<<
25255  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25256  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25257  */
25258  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
25259  __Pyx_GOTREF(__pyx_t_4);
25260  __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
25261  __Pyx_GOTREF(__pyx_t_2);
25262  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25263  __pyx_t_4 = NULL;
25264  __pyx_t_6 = 0;
25265  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25266  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
25267  if (likely(__pyx_t_4)) {
25268  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25269  __Pyx_INCREF(__pyx_t_4);
25270  __Pyx_INCREF(function);
25271  __Pyx_DECREF_SET(__pyx_t_3, function);
25272  __pyx_t_6 = 1;
25273  }
25274  }
25275  #if CYTHON_FAST_PYCALL
25276  if (PyFunction_Check(__pyx_t_3)) {
25277  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_2};
25278  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25279  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25280  __Pyx_GOTREF(__pyx_t_1);
25281  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25282  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25283  } else
25284  #endif
25285  #if CYTHON_FAST_PYCCALL
25286  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
25287  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_2};
25288  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25289  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25290  __Pyx_GOTREF(__pyx_t_1);
25291  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25292  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25293  } else
25294  #endif
25295  {
25296  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error)
25297  __Pyx_GOTREF(__pyx_t_7);
25298  if (__pyx_t_4) {
25299  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
25300  }
25301  __Pyx_GIVEREF(__pyx_t_5);
25302  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
25303  __Pyx_GIVEREF(__pyx_t_2);
25304  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
25305  __pyx_t_5 = 0;
25306  __pyx_t_2 = 0;
25307  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
25308  __Pyx_GOTREF(__pyx_t_1);
25309  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25310  }
25311  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25312  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25313 
25314  /* "ADR.pyx":1102
25315  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25316  * self.ebqe['x'])
25317  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25318  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25319  * self.ebqe[('x')],
25320  */
25321  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
25322  __Pyx_GOTREF(__pyx_t_1);
25323 
25324  /* "ADR.pyx":1107
25325  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25326  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25327  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
25328  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25329  * def estimate_mt(self):
25330  */
25331  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1107, __pyx_L1_error)
25332  __Pyx_GOTREF(__pyx_t_7);
25333  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
25334  __Pyx_GOTREF(__pyx_t_2);
25335  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25336  __pyx_t_7 = NULL;
25337  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
25338  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
25339  if (likely(__pyx_t_7)) {
25340  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
25341  __Pyx_INCREF(__pyx_t_7);
25342  __Pyx_INCREF(function);
25343  __Pyx_DECREF_SET(__pyx_t_2, function);
25344  }
25345  }
25346  if (__pyx_t_7) {
25347  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25348  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25349  } else {
25350  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25351  }
25352  __Pyx_GOTREF(__pyx_t_3);
25353  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25354  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
25355  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
25356  __pyx_t_9 = NULL;
25357  } else {
25358  __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
25359  __Pyx_GOTREF(__pyx_t_2);
25360  __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1107, __pyx_L1_error)
25361  }
25362  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25363  for (;;) {
25364  if (likely(!__pyx_t_9)) {
25365  if (likely(PyList_CheckExact(__pyx_t_2))) {
25366  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
25367  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25368  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
25369  #else
25370  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25371  __Pyx_GOTREF(__pyx_t_3);
25372  #endif
25373  } else {
25374  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
25375  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25376  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
25377  #else
25378  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
25379  __Pyx_GOTREF(__pyx_t_3);
25380  #endif
25381  }
25382  } else {
25383  __pyx_t_3 = __pyx_t_9(__pyx_t_2);
25384  if (unlikely(!__pyx_t_3)) {
25385  PyObject* exc_type = PyErr_Occurred();
25386  if (exc_type) {
25387  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
25388  else __PYX_ERR(0, 1107, __pyx_L1_error)
25389  }
25390  break;
25391  }
25392  __Pyx_GOTREF(__pyx_t_3);
25393  }
25394  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_3);
25395  __pyx_t_3 = 0;
25396 
25397  /* "ADR.pyx":1102
25398  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25399  * self.ebqe['x'])
25400  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25401  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25402  * self.ebqe[('x')],
25403  */
25404  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
25405  __Pyx_GOTREF(__pyx_t_7);
25406  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1102, __pyx_L1_error)
25407  __Pyx_GOTREF(__pyx_t_5);
25408 
25409  /* "ADR.pyx":1103
25410  * self.ebqe['x'])
25411  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25412  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
25413  * self.ebqe[('x')],
25414  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25415  */
25416  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
25417  __Pyx_GOTREF(__pyx_t_4);
25418 
25419  /* "ADR.pyx":1104
25420  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
25421  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25422  * self.ebqe[('x')], # <<<<<<<<<<<<<<
25423  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25424  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25425  */
25426  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1104, __pyx_L1_error)
25427  __Pyx_GOTREF(__pyx_t_10);
25428  __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_n_s_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1104, __pyx_L1_error)
25429  __Pyx_GOTREF(__pyx_t_11);
25430  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25431 
25432  /* "ADR.pyx":1105
25433  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25434  * self.ebqe[('x')],
25435  * self.advectiveFluxBoundaryConditionsSetterDict[cj], # <<<<<<<<<<<<<<
25436  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25437  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25438  */
25439  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1105, __pyx_L1_error)
25440  __Pyx_GOTREF(__pyx_t_10);
25441  __pyx_t_12 = PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1105, __pyx_L1_error)
25442  __Pyx_GOTREF(__pyx_t_12);
25443  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25444 
25445  /* "ADR.pyx":1106
25446  * self.ebqe[('x')],
25447  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25448  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj])) # <<<<<<<<<<<<<<
25449  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25450  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25451  */
25452  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1106, __pyx_L1_error)
25453  __Pyx_GOTREF(__pyx_t_10);
25454  __pyx_t_13 = PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error)
25455  __Pyx_GOTREF(__pyx_t_13);
25456  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25457  __pyx_t_10 = NULL;
25458  __pyx_t_6 = 0;
25459  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
25460  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
25461  if (likely(__pyx_t_10)) {
25462  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25463  __Pyx_INCREF(__pyx_t_10);
25464  __Pyx_INCREF(function);
25465  __Pyx_DECREF_SET(__pyx_t_7, function);
25466  __pyx_t_6 = 1;
25467  }
25468  }
25469  #if CYTHON_FAST_PYCALL
25470  if (PyFunction_Check(__pyx_t_7)) {
25471  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_5, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
25472  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25473  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25474  __Pyx_GOTREF(__pyx_t_3);
25475  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25476  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25477  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
25478  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25479  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25480  } else
25481  #endif
25482  #if CYTHON_FAST_PYCCALL
25483  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
25484  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_5, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
25485  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25486  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25487  __Pyx_GOTREF(__pyx_t_3);
25488  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25489  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25490  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
25491  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25492  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25493  } else
25494  #endif
25495  {
25496  __pyx_t_14 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1102, __pyx_L1_error)
25497  __Pyx_GOTREF(__pyx_t_14);
25498  if (__pyx_t_10) {
25499  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
25500  }
25501  __Pyx_GIVEREF(__pyx_t_5);
25502  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_6, __pyx_t_5);
25503  __Pyx_GIVEREF(__pyx_t_4);
25504  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_6, __pyx_t_4);
25505  __Pyx_GIVEREF(__pyx_t_11);
25506  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_6, __pyx_t_11);
25507  __Pyx_GIVEREF(__pyx_t_12);
25508  PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_6, __pyx_t_12);
25509  __Pyx_GIVEREF(__pyx_t_13);
25510  PyTuple_SET_ITEM(__pyx_t_14, 4+__pyx_t_6, __pyx_t_13);
25511  __pyx_t_5 = 0;
25512  __pyx_t_4 = 0;
25513  __pyx_t_11 = 0;
25514  __pyx_t_12 = 0;
25515  __pyx_t_13 = 0;
25516  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
25517  __Pyx_GOTREF(__pyx_t_3);
25518  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
25519  }
25520  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25521 
25522  /* "ADR.pyx":1102
25523  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25524  * self.ebqe['x'])
25525  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25526  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25527  * self.ebqe[('x')],
25528  */
25529  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
25530  __Pyx_GOTREF(__pyx_t_7);
25531  __Pyx_INCREF(__pyx_v_cj);
25532  __Pyx_GIVEREF(__pyx_v_cj);
25533  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_cj);
25534  __Pyx_GIVEREF(__pyx_t_3);
25535  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
25536  __pyx_t_3 = 0;
25537  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1102, __pyx_L1_error)
25538  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25539 
25540  /* "ADR.pyx":1107
25541  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
25542  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25543  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
25544  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25545  * def estimate_mt(self):
25546  */
25547  }
25548  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25549 
25550  /* "ADR.pyx":1102
25551  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
25552  * self.ebqe['x'])
25553  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
25554  * self.nElementBoundaryQuadraturePoints_elementBoundary,
25555  * self.ebqe[('x')],
25556  */
25557  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
25558  __Pyx_GOTREF(__pyx_t_2);
25559  __Pyx_GIVEREF(__pyx_t_1);
25560  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
25561  __pyx_t_1 = 0;
25562  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
25563  __Pyx_GOTREF(__pyx_t_1);
25564  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25565  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_t_1) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
25566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25567 
25568  /* "ADR.pyx":1108
25569  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
25570  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25571  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe) # <<<<<<<<<<<<<<
25572  * def estimate_mt(self):
25573  * pass
25574  */
25575  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25576  __Pyx_GOTREF(__pyx_t_2);
25577  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_initializeGlobalExteriorElementB); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1108, __pyx_L1_error)
25578  __Pyx_GOTREF(__pyx_t_7);
25579  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25580  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25581  __Pyx_GOTREF(__pyx_t_2);
25582  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1108, __pyx_L1_error)
25583  __Pyx_GOTREF(__pyx_t_3);
25584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25585  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1108, __pyx_L1_error)
25586  __Pyx_GOTREF(__pyx_t_2);
25587  __pyx_t_14 = NULL;
25588  __pyx_t_6 = 0;
25589  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
25590  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
25591  if (likely(__pyx_t_14)) {
25592  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25593  __Pyx_INCREF(__pyx_t_14);
25594  __Pyx_INCREF(function);
25595  __Pyx_DECREF_SET(__pyx_t_7, function);
25596  __pyx_t_6 = 1;
25597  }
25598  }
25599  #if CYTHON_FAST_PYCALL
25600  if (PyFunction_Check(__pyx_t_7)) {
25601  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_3, __pyx_t_2};
25602  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25603  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
25604  __Pyx_GOTREF(__pyx_t_1);
25605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25606  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25607  } else
25608  #endif
25609  #if CYTHON_FAST_PYCCALL
25610  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
25611  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_3, __pyx_t_2};
25612  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25613  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
25614  __Pyx_GOTREF(__pyx_t_1);
25615  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25616  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25617  } else
25618  #endif
25619  {
25620  __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1108, __pyx_L1_error)
25621  __Pyx_GOTREF(__pyx_t_13);
25622  if (__pyx_t_14) {
25623  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL;
25624  }
25625  __Pyx_GIVEREF(__pyx_t_3);
25626  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_3);
25627  __Pyx_GIVEREF(__pyx_t_2);
25628  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_2);
25629  __pyx_t_3 = 0;
25630  __pyx_t_2 = 0;
25631  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
25632  __Pyx_GOTREF(__pyx_t_1);
25633  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
25634  }
25635  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25636  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25637 
25638  /* "ADR.pyx":1095
25639  * def calculateElementBoundaryQuadrature(self):
25640  * pass
25641  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
25642  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
25643  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
25644  */
25645 
25646  /* function exit code */
25647  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25648  goto __pyx_L0;
25649  __pyx_L1_error:;
25650  __Pyx_XDECREF(__pyx_t_1);
25651  __Pyx_XDECREF(__pyx_t_2);
25652  __Pyx_XDECREF(__pyx_t_3);
25653  __Pyx_XDECREF(__pyx_t_4);
25654  __Pyx_XDECREF(__pyx_t_5);
25655  __Pyx_XDECREF(__pyx_t_7);
25656  __Pyx_XDECREF(__pyx_t_10);
25657  __Pyx_XDECREF(__pyx_t_11);
25658  __Pyx_XDECREF(__pyx_t_12);
25659  __Pyx_XDECREF(__pyx_t_13);
25660  __Pyx_XDECREF(__pyx_t_14);
25661  __Pyx_AddTraceback("ADR.LevelModel.calculateExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
25662  __pyx_r = NULL;
25663  __pyx_L0:;
25664  __Pyx_XDECREF(__pyx_v_cj);
25665  __Pyx_XGIVEREF(__pyx_r);
25666  __Pyx_RefNannyFinishContext();
25667  return __pyx_r;
25668 }
25669 
25670 /* "ADR.pyx":1109
25671  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
25672  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
25673  * def estimate_mt(self): # <<<<<<<<<<<<<<
25674  * pass
25675  * def calculateAuxiliaryQuantitiesAfterStep(self):
25676  */
25677 
25678 /* Python wrapper */
25679 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25680 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_15estimate_mt = {"estimate_mt", (PyCFunction)__pyx_pw_3ADR_10LevelModel_15estimate_mt, METH_O, 0};
25681 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25682  PyObject *__pyx_r = 0;
25683  __Pyx_RefNannyDeclarations
25684  __Pyx_RefNannySetupContext("estimate_mt (wrapper)", 0);
25685  __pyx_r = __pyx_pf_3ADR_10LevelModel_14estimate_mt(__pyx_self, ((PyObject *)__pyx_v_self));
25686 
25687  /* function exit code */
25688  __Pyx_RefNannyFinishContext();
25689  return __pyx_r;
25690 }
25691 
25692 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25693  PyObject *__pyx_r = NULL;
25694  __Pyx_RefNannyDeclarations
25695  __Pyx_RefNannySetupContext("estimate_mt", 0);
25696 
25697  /* function exit code */
25698  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25699  __Pyx_XGIVEREF(__pyx_r);
25700  __Pyx_RefNannyFinishContext();
25701  return __pyx_r;
25702 }
25703 
25704 /* "ADR.pyx":1111
25705  * def estimate_mt(self):
25706  * pass
25707  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
25708  * pass
25709  * def calculateSolutionAtQuadrature(self):
25710  */
25711 
25712 /* Python wrapper */
25713 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25714 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep = {"calculateAuxiliaryQuantitiesAfterStep", (PyCFunction)__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, METH_O, 0};
25715 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25716  PyObject *__pyx_r = 0;
25717  __Pyx_RefNannyDeclarations
25718  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep (wrapper)", 0);
25719  __pyx_r = __pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(__pyx_self, ((PyObject *)__pyx_v_self));
25720 
25721  /* function exit code */
25722  __Pyx_RefNannyFinishContext();
25723  return __pyx_r;
25724 }
25725 
25726 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25727  PyObject *__pyx_r = NULL;
25728  __Pyx_RefNannyDeclarations
25729  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep", 0);
25730 
25731  /* function exit code */
25732  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25733  __Pyx_XGIVEREF(__pyx_r);
25734  __Pyx_RefNannyFinishContext();
25735  return __pyx_r;
25736 }
25737 
25738 /* "ADR.pyx":1113
25739  * def calculateAuxiliaryQuantitiesAfterStep(self):
25740  * pass
25741  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
25742  * pass
25743  */
25744 
25745 /* Python wrapper */
25746 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
25747 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature = {"calculateSolutionAtQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature, METH_O, 0};
25748 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
25749  PyObject *__pyx_r = 0;
25750  __Pyx_RefNannyDeclarations
25751  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature (wrapper)", 0);
25752  __pyx_r = __pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
25753 
25754  /* function exit code */
25755  __Pyx_RefNannyFinishContext();
25756  return __pyx_r;
25757 }
25758 
25759 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
25760  PyObject *__pyx_r = NULL;
25761  __Pyx_RefNannyDeclarations
25762  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature", 0);
25763 
25764  /* function exit code */
25765  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25766  __Pyx_XGIVEREF(__pyx_r);
25767  __Pyx_RefNannyFinishContext();
25768  return __pyx_r;
25769 }
25770 
25771 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
25772  * # experimental exception made for __getbuffer__ and __releasebuffer__
25773  * # -- the details of this may change.
25774  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
25775  * # This implementation of getbuffer is geared towards Cython
25776  * # requirements, and does not yet fullfill the PEP.
25777  */
25778 
25779 /* Python wrapper */
25780 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
25781 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25782  int __pyx_r;
25783  __Pyx_RefNannyDeclarations
25784  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25785  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25786 
25787  /* function exit code */
25788  __Pyx_RefNannyFinishContext();
25789  return __pyx_r;
25790 }
25791 
25792 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25793  int __pyx_v_copy_shape;
25794  int __pyx_v_i;
25795  int __pyx_v_ndim;
25796  int __pyx_v_endian_detector;
25797  int __pyx_v_little_endian;
25798  int __pyx_v_t;
25799  char *__pyx_v_f;
25800  PyArray_Descr *__pyx_v_descr = 0;
25801  int __pyx_v_offset;
25802  int __pyx_v_hasfields;
25803  int __pyx_r;
25804  __Pyx_RefNannyDeclarations
25805  int __pyx_t_1;
25806  int __pyx_t_2;
25807  PyObject *__pyx_t_3 = NULL;
25808  int __pyx_t_4;
25809  int __pyx_t_5;
25810  PyObject *__pyx_t_6 = NULL;
25811  char *__pyx_t_7;
25812  __Pyx_RefNannySetupContext("__getbuffer__", 0);
25813  if (__pyx_v_info != NULL) {
25814  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25815  __Pyx_GIVEREF(__pyx_v_info->obj);
25816  }
25817 
25818  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
25819  * # of flags
25820  *
25821  * if info == NULL: return # <<<<<<<<<<<<<<
25822  *
25823  * cdef int copy_shape, i, ndim
25824  */
25825  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
25826  if (__pyx_t_1) {
25827  __pyx_r = 0;
25828  goto __pyx_L0;
25829  }
25830 
25831  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
25832  *
25833  * cdef int copy_shape, i, ndim
25834  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
25835  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25836  *
25837  */
25838  __pyx_v_endian_detector = 1;
25839 
25840  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207
25841  * cdef int copy_shape, i, ndim
25842  * cdef int endian_detector = 1
25843  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
25844  *
25845  * ndim = PyArray_NDIM(self)
25846  */
25847  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
25848 
25849  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
25850  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25851  *
25852  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
25853  *
25854  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25855  */
25856  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
25857 
25858  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
25859  * ndim = PyArray_NDIM(self)
25860  *
25861  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25862  * copy_shape = 1
25863  * else:
25864  */
25865  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25866  if (__pyx_t_1) {
25867 
25868  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212
25869  *
25870  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25871  * copy_shape = 1 # <<<<<<<<<<<<<<
25872  * else:
25873  * copy_shape = 0
25874  */
25875  __pyx_v_copy_shape = 1;
25876 
25877  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
25878  * ndim = PyArray_NDIM(self)
25879  *
25880  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25881  * copy_shape = 1
25882  * else:
25883  */
25884  goto __pyx_L4;
25885  }
25886 
25887  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
25888  * copy_shape = 1
25889  * else:
25890  * copy_shape = 0 # <<<<<<<<<<<<<<
25891  *
25892  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25893  */
25894  /*else*/ {
25895  __pyx_v_copy_shape = 0;
25896  }
25897  __pyx_L4:;
25898 
25899  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25900  * copy_shape = 0
25901  *
25902  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25903  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25904  * raise ValueError(u"ndarray is not C contiguous")
25905  */
25906  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
25907  if (__pyx_t_2) {
25908  } else {
25909  __pyx_t_1 = __pyx_t_2;
25910  goto __pyx_L6_bool_binop_done;
25911  }
25912 
25913  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
25914  *
25915  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25916  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
25917  * raise ValueError(u"ndarray is not C contiguous")
25918  *
25919  */
25920  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
25921  __pyx_t_1 = __pyx_t_2;
25922  __pyx_L6_bool_binop_done:;
25923 
25924  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25925  * copy_shape = 0
25926  *
25927  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25928  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25929  * raise ValueError(u"ndarray is not C contiguous")
25930  */
25931  if (__pyx_t_1) {
25932 
25933  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
25934  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25935  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25936  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
25937  *
25938  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25939  */
25940  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 218, __pyx_L1_error)
25941  __Pyx_GOTREF(__pyx_t_3);
25942  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25943  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25944  __PYX_ERR(1, 218, __pyx_L1_error)
25945 
25946  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
25947  * copy_shape = 0
25948  *
25949  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25950  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
25951  * raise ValueError(u"ndarray is not C contiguous")
25952  */
25953  }
25954 
25955  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
25956  * raise ValueError(u"ndarray is not C contiguous")
25957  *
25958  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25959  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25960  * raise ValueError(u"ndarray is not Fortran contiguous")
25961  */
25962  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
25963  if (__pyx_t_2) {
25964  } else {
25965  __pyx_t_1 = __pyx_t_2;
25966  goto __pyx_L9_bool_binop_done;
25967  }
25968 
25969  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
25970  *
25971  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25972  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
25973  * raise ValueError(u"ndarray is not Fortran contiguous")
25974  *
25975  */
25976  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
25977  __pyx_t_1 = __pyx_t_2;
25978  __pyx_L9_bool_binop_done:;
25979 
25980  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
25981  * raise ValueError(u"ndarray is not C contiguous")
25982  *
25983  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25984  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25985  * raise ValueError(u"ndarray is not Fortran contiguous")
25986  */
25987  if (__pyx_t_1) {
25988 
25989  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
25990  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25991  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
25992  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
25993  *
25994  * info.buf = PyArray_DATA(self)
25995  */
25996  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
25997  __Pyx_GOTREF(__pyx_t_3);
25998  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25999  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26000  __PYX_ERR(1, 222, __pyx_L1_error)
26001 
26002  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
26003  * raise ValueError(u"ndarray is not C contiguous")
26004  *
26005  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
26006  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
26007  * raise ValueError(u"ndarray is not Fortran contiguous")
26008  */
26009  }
26010 
26011  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224
26012  * raise ValueError(u"ndarray is not Fortran contiguous")
26013  *
26014  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
26015  * info.ndim = ndim
26016  * if copy_shape:
26017  */
26018  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
26019 
26020  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
26021  *
26022  * info.buf = PyArray_DATA(self)
26023  * info.ndim = ndim # <<<<<<<<<<<<<<
26024  * if copy_shape:
26025  * # Allocate new buffer for strides and shape info.
26026  */
26027  __pyx_v_info->ndim = __pyx_v_ndim;
26028 
26029  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
26030  * info.buf = PyArray_DATA(self)
26031  * info.ndim = ndim
26032  * if copy_shape: # <<<<<<<<<<<<<<
26033  * # Allocate new buffer for strides and shape info.
26034  * # This is allocated as one block, strides first.
26035  */
26036  __pyx_t_1 = (__pyx_v_copy_shape != 0);
26037  if (__pyx_t_1) {
26038 
26039  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
26040  * # Allocate new buffer for strides and shape info.
26041  * # This is allocated as one block, strides first.
26042  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2) # <<<<<<<<<<<<<<
26043  * info.shape = info.strides + ndim
26044  * for i in range(ndim):
26045  */
26046  __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
26047 
26048  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
26049  * # This is allocated as one block, strides first.
26050  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
26051  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
26052  * for i in range(ndim):
26053  * info.strides[i] = PyArray_STRIDES(self)[i]
26054  */
26055  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
26056 
26057  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
26058  * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
26059  * info.shape = info.strides + ndim
26060  * for i in range(ndim): # <<<<<<<<<<<<<<
26061  * info.strides[i] = PyArray_STRIDES(self)[i]
26062  * info.shape[i] = PyArray_DIMS(self)[i]
26063  */
26064  __pyx_t_4 = __pyx_v_ndim;
26065  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
26066  __pyx_v_i = __pyx_t_5;
26067 
26068  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
26069  * info.shape = info.strides + ndim
26070  * for i in range(ndim):
26071  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
26072  * info.shape[i] = PyArray_DIMS(self)[i]
26073  * else:
26074  */
26075  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
26076 
26077  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
26078  * for i in range(ndim):
26079  * info.strides[i] = PyArray_STRIDES(self)[i]
26080  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
26081  * else:
26082  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26083  */
26084  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
26085  }
26086 
26087  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
26088  * info.buf = PyArray_DATA(self)
26089  * info.ndim = ndim
26090  * if copy_shape: # <<<<<<<<<<<<<<
26091  * # Allocate new buffer for strides and shape info.
26092  * # This is allocated as one block, strides first.
26093  */
26094  goto __pyx_L11;
26095  }
26096 
26097  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
26098  * info.shape[i] = PyArray_DIMS(self)[i]
26099  * else:
26100  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
26101  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26102  * info.suboffsets = NULL
26103  */
26104  /*else*/ {
26105  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
26106 
26107  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
26108  * else:
26109  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26110  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
26111  * info.suboffsets = NULL
26112  * info.itemsize = PyArray_ITEMSIZE(self)
26113  */
26114  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
26115  }
26116  __pyx_L11:;
26117 
26118  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
26119  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
26120  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26121  * info.suboffsets = NULL # <<<<<<<<<<<<<<
26122  * info.itemsize = PyArray_ITEMSIZE(self)
26123  * info.readonly = not PyArray_ISWRITEABLE(self)
26124  */
26125  __pyx_v_info->suboffsets = NULL;
26126 
26127  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238
26128  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
26129  * info.suboffsets = NULL
26130  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
26131  * info.readonly = not PyArray_ISWRITEABLE(self)
26132  *
26133  */
26134  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
26135 
26136  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
26137  * info.suboffsets = NULL
26138  * info.itemsize = PyArray_ITEMSIZE(self)
26139  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
26140  *
26141  * cdef int t
26142  */
26143  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
26144 
26145  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
26146  *
26147  * cdef int t
26148  * cdef char* f = NULL # <<<<<<<<<<<<<<
26149  * cdef dtype descr = self.descr
26150  * cdef int offset
26151  */
26152  __pyx_v_f = NULL;
26153 
26154  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
26155  * cdef int t
26156  * cdef char* f = NULL
26157  * cdef dtype descr = self.descr # <<<<<<<<<<<<<<
26158  * cdef int offset
26159  *
26160  */
26161  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
26162  __Pyx_INCREF(__pyx_t_3);
26163  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
26164  __pyx_t_3 = 0;
26165 
26166  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
26167  * cdef int offset
26168  *
26169  * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
26170  *
26171  * if not hasfields and not copy_shape:
26172  */
26173  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
26174 
26175  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
26176  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
26177  *
26178  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
26179  * # do not call releasebuffer
26180  * info.obj = None
26181  */
26182  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
26183  if (__pyx_t_2) {
26184  } else {
26185  __pyx_t_1 = __pyx_t_2;
26186  goto __pyx_L15_bool_binop_done;
26187  }
26188  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
26189  __pyx_t_1 = __pyx_t_2;
26190  __pyx_L15_bool_binop_done:;
26191  if (__pyx_t_1) {
26192 
26193  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
26194  * if not hasfields and not copy_shape:
26195  * # do not call releasebuffer
26196  * info.obj = None # <<<<<<<<<<<<<<
26197  * else:
26198  * # need to call releasebuffer
26199  */
26200  __Pyx_INCREF(Py_None);
26201  __Pyx_GIVEREF(Py_None);
26202  __Pyx_GOTREF(__pyx_v_info->obj);
26203  __Pyx_DECREF(__pyx_v_info->obj);
26204  __pyx_v_info->obj = Py_None;
26205 
26206  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
26207  * cdef bint hasfields = PyDataType_HASFIELDS(descr)
26208  *
26209  * if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
26210  * # do not call releasebuffer
26211  * info.obj = None
26212  */
26213  goto __pyx_L14;
26214  }
26215 
26216  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
26217  * else:
26218  * # need to call releasebuffer
26219  * info.obj = self # <<<<<<<<<<<<<<
26220  *
26221  * if not hasfields:
26222  */
26223  /*else*/ {
26224  __Pyx_INCREF(((PyObject *)__pyx_v_self));
26225  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
26226  __Pyx_GOTREF(__pyx_v_info->obj);
26227  __Pyx_DECREF(__pyx_v_info->obj);
26228  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
26229  }
26230  __pyx_L14:;
26231 
26232  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
26233  * info.obj = self
26234  *
26235  * if not hasfields: # <<<<<<<<<<<<<<
26236  * t = descr.type_num
26237  * if ((descr.byteorder == c'>' and little_endian) or
26238  */
26239  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
26240  if (__pyx_t_1) {
26241 
26242  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
26243  *
26244  * if not hasfields:
26245  * t = descr.type_num # <<<<<<<<<<<<<<
26246  * if ((descr.byteorder == c'>' and little_endian) or
26247  * (descr.byteorder == c'<' and not little_endian)):
26248  */
26249  __pyx_t_4 = __pyx_v_descr->type_num;
26250  __pyx_v_t = __pyx_t_4;
26251 
26252  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26253  * if not hasfields:
26254  * t = descr.type_num
26255  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26256  * (descr.byteorder == c'<' and not little_endian)):
26257  * raise ValueError(u"Non-native byte order not supported")
26258  */
26259  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
26260  if (!__pyx_t_2) {
26261  goto __pyx_L20_next_or;
26262  } else {
26263  }
26264  __pyx_t_2 = (__pyx_v_little_endian != 0);
26265  if (!__pyx_t_2) {
26266  } else {
26267  __pyx_t_1 = __pyx_t_2;
26268  goto __pyx_L19_bool_binop_done;
26269  }
26270  __pyx_L20_next_or:;
26271 
26272  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
26273  * t = descr.type_num
26274  * if ((descr.byteorder == c'>' and little_endian) or
26275  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
26276  * raise ValueError(u"Non-native byte order not supported")
26277  * if t == NPY_BYTE: f = "b"
26278  */
26279  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
26280  if (__pyx_t_2) {
26281  } else {
26282  __pyx_t_1 = __pyx_t_2;
26283  goto __pyx_L19_bool_binop_done;
26284  }
26285  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
26286  __pyx_t_1 = __pyx_t_2;
26287  __pyx_L19_bool_binop_done:;
26288 
26289  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26290  * if not hasfields:
26291  * t = descr.type_num
26292  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26293  * (descr.byteorder == c'<' and not little_endian)):
26294  * raise ValueError(u"Non-native byte order not supported")
26295  */
26296  if (__pyx_t_1) {
26297 
26298  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
26299  * if ((descr.byteorder == c'>' and little_endian) or
26300  * (descr.byteorder == c'<' and not little_endian)):
26301  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
26302  * if t == NPY_BYTE: f = "b"
26303  * elif t == NPY_UBYTE: f = "B"
26304  */
26305  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 259, __pyx_L1_error)
26306  __Pyx_GOTREF(__pyx_t_3);
26307  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26308  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26309  __PYX_ERR(1, 259, __pyx_L1_error)
26310 
26311  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
26312  * if not hasfields:
26313  * t = descr.type_num
26314  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26315  * (descr.byteorder == c'<' and not little_endian)):
26316  * raise ValueError(u"Non-native byte order not supported")
26317  */
26318  }
26319 
26320  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
26321  * (descr.byteorder == c'<' and not little_endian)):
26322  * raise ValueError(u"Non-native byte order not supported")
26323  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
26324  * elif t == NPY_UBYTE: f = "B"
26325  * elif t == NPY_SHORT: f = "h"
26326  */
26327  switch (__pyx_v_t) {
26328  case NPY_BYTE:
26329  __pyx_v_f = ((char *)"b");
26330  break;
26331 
26332  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
26333  * raise ValueError(u"Non-native byte order not supported")
26334  * if t == NPY_BYTE: f = "b"
26335  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
26336  * elif t == NPY_SHORT: f = "h"
26337  * elif t == NPY_USHORT: f = "H"
26338  */
26339  case NPY_UBYTE:
26340  __pyx_v_f = ((char *)"B");
26341  break;
26342 
26343  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
26344  * if t == NPY_BYTE: f = "b"
26345  * elif t == NPY_UBYTE: f = "B"
26346  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
26347  * elif t == NPY_USHORT: f = "H"
26348  * elif t == NPY_INT: f = "i"
26349  */
26350  case NPY_SHORT:
26351  __pyx_v_f = ((char *)"h");
26352  break;
26353 
26354  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
26355  * elif t == NPY_UBYTE: f = "B"
26356  * elif t == NPY_SHORT: f = "h"
26357  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
26358  * elif t == NPY_INT: f = "i"
26359  * elif t == NPY_UINT: f = "I"
26360  */
26361  case NPY_USHORT:
26362  __pyx_v_f = ((char *)"H");
26363  break;
26364 
26365  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
26366  * elif t == NPY_SHORT: f = "h"
26367  * elif t == NPY_USHORT: f = "H"
26368  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
26369  * elif t == NPY_UINT: f = "I"
26370  * elif t == NPY_LONG: f = "l"
26371  */
26372  case NPY_INT:
26373  __pyx_v_f = ((char *)"i");
26374  break;
26375 
26376  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
26377  * elif t == NPY_USHORT: f = "H"
26378  * elif t == NPY_INT: f = "i"
26379  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
26380  * elif t == NPY_LONG: f = "l"
26381  * elif t == NPY_ULONG: f = "L"
26382  */
26383  case NPY_UINT:
26384  __pyx_v_f = ((char *)"I");
26385  break;
26386 
26387  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
26388  * elif t == NPY_INT: f = "i"
26389  * elif t == NPY_UINT: f = "I"
26390  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
26391  * elif t == NPY_ULONG: f = "L"
26392  * elif t == NPY_LONGLONG: f = "q"
26393  */
26394  case NPY_LONG:
26395  __pyx_v_f = ((char *)"l");
26396  break;
26397 
26398  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
26399  * elif t == NPY_UINT: f = "I"
26400  * elif t == NPY_LONG: f = "l"
26401  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
26402  * elif t == NPY_LONGLONG: f = "q"
26403  * elif t == NPY_ULONGLONG: f = "Q"
26404  */
26405  case NPY_ULONG:
26406  __pyx_v_f = ((char *)"L");
26407  break;
26408 
26409  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
26410  * elif t == NPY_LONG: f = "l"
26411  * elif t == NPY_ULONG: f = "L"
26412  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
26413  * elif t == NPY_ULONGLONG: f = "Q"
26414  * elif t == NPY_FLOAT: f = "f"
26415  */
26416  case NPY_LONGLONG:
26417  __pyx_v_f = ((char *)"q");
26418  break;
26419 
26420  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
26421  * elif t == NPY_ULONG: f = "L"
26422  * elif t == NPY_LONGLONG: f = "q"
26423  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
26424  * elif t == NPY_FLOAT: f = "f"
26425  * elif t == NPY_DOUBLE: f = "d"
26426  */
26427  case NPY_ULONGLONG:
26428  __pyx_v_f = ((char *)"Q");
26429  break;
26430 
26431  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
26432  * elif t == NPY_LONGLONG: f = "q"
26433  * elif t == NPY_ULONGLONG: f = "Q"
26434  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
26435  * elif t == NPY_DOUBLE: f = "d"
26436  * elif t == NPY_LONGDOUBLE: f = "g"
26437  */
26438  case NPY_FLOAT:
26439  __pyx_v_f = ((char *)"f");
26440  break;
26441 
26442  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
26443  * elif t == NPY_ULONGLONG: f = "Q"
26444  * elif t == NPY_FLOAT: f = "f"
26445  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
26446  * elif t == NPY_LONGDOUBLE: f = "g"
26447  * elif t == NPY_CFLOAT: f = "Zf"
26448  */
26449  case NPY_DOUBLE:
26450  __pyx_v_f = ((char *)"d");
26451  break;
26452 
26453  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
26454  * elif t == NPY_FLOAT: f = "f"
26455  * elif t == NPY_DOUBLE: f = "d"
26456  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
26457  * elif t == NPY_CFLOAT: f = "Zf"
26458  * elif t == NPY_CDOUBLE: f = "Zd"
26459  */
26460  case NPY_LONGDOUBLE:
26461  __pyx_v_f = ((char *)"g");
26462  break;
26463 
26464  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
26465  * elif t == NPY_DOUBLE: f = "d"
26466  * elif t == NPY_LONGDOUBLE: f = "g"
26467  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
26468  * elif t == NPY_CDOUBLE: f = "Zd"
26469  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26470  */
26471  case NPY_CFLOAT:
26472  __pyx_v_f = ((char *)"Zf");
26473  break;
26474 
26475  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
26476  * elif t == NPY_LONGDOUBLE: f = "g"
26477  * elif t == NPY_CFLOAT: f = "Zf"
26478  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
26479  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26480  * elif t == NPY_OBJECT: f = "O"
26481  */
26482  case NPY_CDOUBLE:
26483  __pyx_v_f = ((char *)"Zd");
26484  break;
26485 
26486  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
26487  * elif t == NPY_CFLOAT: f = "Zf"
26488  * elif t == NPY_CDOUBLE: f = "Zd"
26489  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
26490  * elif t == NPY_OBJECT: f = "O"
26491  * else:
26492  */
26493  case NPY_CLONGDOUBLE:
26494  __pyx_v_f = ((char *)"Zg");
26495  break;
26496 
26497  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
26498  * elif t == NPY_CDOUBLE: f = "Zd"
26499  * elif t == NPY_CLONGDOUBLE: f = "Zg"
26500  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
26501  * else:
26502  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26503  */
26504  case NPY_OBJECT:
26505  __pyx_v_f = ((char *)"O");
26506  break;
26507  default:
26508 
26509  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
26510  * elif t == NPY_OBJECT: f = "O"
26511  * else:
26512  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
26513  * info.format = f
26514  * return
26515  */
26516  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
26517  __Pyx_GOTREF(__pyx_t_3);
26518  __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
26519  __Pyx_GOTREF(__pyx_t_6);
26520  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26521  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 278, __pyx_L1_error)
26522  __Pyx_GOTREF(__pyx_t_3);
26523  __Pyx_GIVEREF(__pyx_t_6);
26524  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
26525  __pyx_t_6 = 0;
26526  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 278, __pyx_L1_error)
26527  __Pyx_GOTREF(__pyx_t_6);
26528  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26529  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
26530  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
26531  __PYX_ERR(1, 278, __pyx_L1_error)
26532  break;
26533  }
26534 
26535  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
26536  * else:
26537  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26538  * info.format = f # <<<<<<<<<<<<<<
26539  * return
26540  * else:
26541  */
26542  __pyx_v_info->format = __pyx_v_f;
26543 
26544  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
26545  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26546  * info.format = f
26547  * return # <<<<<<<<<<<<<<
26548  * else:
26549  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26550  */
26551  __pyx_r = 0;
26552  goto __pyx_L0;
26553 
26554  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
26555  * info.obj = self
26556  *
26557  * if not hasfields: # <<<<<<<<<<<<<<
26558  * t = descr.type_num
26559  * if ((descr.byteorder == c'>' and little_endian) or
26560  */
26561  }
26562 
26563  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
26564  * return
26565  * else:
26566  * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
26567  * info.format[0] = c'^' # Native data types, manual alignment
26568  * offset = 0
26569  */
26570  /*else*/ {
26571  __pyx_v_info->format = ((char *)malloc(0xFF));
26572 
26573  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
26574  * else:
26575  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26576  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
26577  * offset = 0
26578  * f = _util_dtypestring(descr, info.format + 1,
26579  */
26580  (__pyx_v_info->format[0]) = '^';
26581 
26582  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
26583  * info.format = <char*>stdlib.malloc(_buffer_format_string_len)
26584  * info.format[0] = c'^' # Native data types, manual alignment
26585  * offset = 0 # <<<<<<<<<<<<<<
26586  * f = _util_dtypestring(descr, info.format + 1,
26587  * info.format + _buffer_format_string_len,
26588  */
26589  __pyx_v_offset = 0;
26590 
26591  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
26592  * info.format[0] = c'^' # Native data types, manual alignment
26593  * offset = 0
26594  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
26595  * info.format + _buffer_format_string_len,
26596  * &offset)
26597  */
26598  __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) __PYX_ERR(1, 285, __pyx_L1_error)
26599  __pyx_v_f = __pyx_t_7;
26600 
26601  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
26602  * info.format + _buffer_format_string_len,
26603  * &offset)
26604  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
26605  *
26606  * def __releasebuffer__(ndarray self, Py_buffer* info):
26607  */
26608  (__pyx_v_f[0]) = '\x00';
26609  }
26610 
26611  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
26612  * # experimental exception made for __getbuffer__ and __releasebuffer__
26613  * # -- the details of this may change.
26614  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
26615  * # This implementation of getbuffer is geared towards Cython
26616  * # requirements, and does not yet fullfill the PEP.
26617  */
26618 
26619  /* function exit code */
26620  __pyx_r = 0;
26621  goto __pyx_L0;
26622  __pyx_L1_error:;
26623  __Pyx_XDECREF(__pyx_t_3);
26624  __Pyx_XDECREF(__pyx_t_6);
26625  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26626  __pyx_r = -1;
26627  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
26628  __Pyx_GOTREF(__pyx_v_info->obj);
26629  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
26630  }
26631  goto __pyx_L2;
26632  __pyx_L0:;
26633  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
26634  __Pyx_GOTREF(Py_None);
26635  __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
26636  }
26637  __pyx_L2:;
26638  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
26639  __Pyx_RefNannyFinishContext();
26640  return __pyx_r;
26641 }
26642 
26643 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
26644  * f[0] = c'\0' # Terminate format string
26645  *
26646  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
26647  * if PyArray_HASFIELDS(self):
26648  * stdlib.free(info.format)
26649  */
26650 
26651 /* Python wrapper */
26652 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
26653 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26654  __Pyx_RefNannyDeclarations
26655  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
26656  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
26657 
26658  /* function exit code */
26659  __Pyx_RefNannyFinishContext();
26660 }
26661 
26662 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
26663  __Pyx_RefNannyDeclarations
26664  int __pyx_t_1;
26665  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
26666 
26667  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
26668  *
26669  * def __releasebuffer__(ndarray self, Py_buffer* info):
26670  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
26671  * stdlib.free(info.format)
26672  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26673  */
26674  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
26675  if (__pyx_t_1) {
26676 
26677  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
26678  * def __releasebuffer__(ndarray self, Py_buffer* info):
26679  * if PyArray_HASFIELDS(self):
26680  * stdlib.free(info.format) # <<<<<<<<<<<<<<
26681  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26682  * stdlib.free(info.strides)
26683  */
26684  free(__pyx_v_info->format);
26685 
26686  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
26687  *
26688  * def __releasebuffer__(ndarray self, Py_buffer* info):
26689  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
26690  * stdlib.free(info.format)
26691  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26692  */
26693  }
26694 
26695  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
26696  * if PyArray_HASFIELDS(self):
26697  * stdlib.free(info.format)
26698  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
26699  * stdlib.free(info.strides)
26700  * # info.shape was stored after info.strides in the same block
26701  */
26702  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
26703  if (__pyx_t_1) {
26704 
26705  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
26706  * stdlib.free(info.format)
26707  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
26708  * stdlib.free(info.strides) # <<<<<<<<<<<<<<
26709  * # info.shape was stored after info.strides in the same block
26710  *
26711  */
26712  free(__pyx_v_info->strides);
26713 
26714  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
26715  * if PyArray_HASFIELDS(self):
26716  * stdlib.free(info.format)
26717  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
26718  * stdlib.free(info.strides)
26719  * # info.shape was stored after info.strides in the same block
26720  */
26721  }
26722 
26723  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
26724  * f[0] = c'\0' # Terminate format string
26725  *
26726  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
26727  * if PyArray_HASFIELDS(self):
26728  * stdlib.free(info.format)
26729  */
26730 
26731  /* function exit code */
26732  __Pyx_RefNannyFinishContext();
26733 }
26734 
26735 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
26736  * ctypedef npy_cdouble complex_t
26737  *
26738  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
26739  * return PyArray_MultiIterNew(1, <void*>a)
26740  *
26741  */
26742 
26743 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
26744  PyObject *__pyx_r = NULL;
26745  __Pyx_RefNannyDeclarations
26746  PyObject *__pyx_t_1 = NULL;
26747  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
26748 
26749  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
26750  *
26751  * cdef inline object PyArray_MultiIterNew1(a):
26752  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
26753  *
26754  * cdef inline object PyArray_MultiIterNew2(a, b):
26755  */
26756  __Pyx_XDECREF(__pyx_r);
26757  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 771, __pyx_L1_error)
26758  __Pyx_GOTREF(__pyx_t_1);
26759  __pyx_r = __pyx_t_1;
26760  __pyx_t_1 = 0;
26761  goto __pyx_L0;
26762 
26763  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
26764  * ctypedef npy_cdouble complex_t
26765  *
26766  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
26767  * return PyArray_MultiIterNew(1, <void*>a)
26768  *
26769  */
26770 
26771  /* function exit code */
26772  __pyx_L1_error:;
26773  __Pyx_XDECREF(__pyx_t_1);
26774  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
26775  __pyx_r = 0;
26776  __pyx_L0:;
26777  __Pyx_XGIVEREF(__pyx_r);
26778  __Pyx_RefNannyFinishContext();
26779  return __pyx_r;
26780 }
26781 
26782 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
26783  * return PyArray_MultiIterNew(1, <void*>a)
26784  *
26785  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
26786  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26787  *
26788  */
26789 
26790 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
26791  PyObject *__pyx_r = NULL;
26792  __Pyx_RefNannyDeclarations
26793  PyObject *__pyx_t_1 = NULL;
26794  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
26795 
26796  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
26797  *
26798  * cdef inline object PyArray_MultiIterNew2(a, b):
26799  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
26800  *
26801  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26802  */
26803  __Pyx_XDECREF(__pyx_r);
26804  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 774, __pyx_L1_error)
26805  __Pyx_GOTREF(__pyx_t_1);
26806  __pyx_r = __pyx_t_1;
26807  __pyx_t_1 = 0;
26808  goto __pyx_L0;
26809 
26810  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
26811  * return PyArray_MultiIterNew(1, <void*>a)
26812  *
26813  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
26814  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26815  *
26816  */
26817 
26818  /* function exit code */
26819  __pyx_L1_error:;
26820  __Pyx_XDECREF(__pyx_t_1);
26821  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
26822  __pyx_r = 0;
26823  __pyx_L0:;
26824  __Pyx_XGIVEREF(__pyx_r);
26825  __Pyx_RefNannyFinishContext();
26826  return __pyx_r;
26827 }
26828 
26829 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
26830  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26831  *
26832  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
26833  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26834  *
26835  */
26836 
26837 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
26838  PyObject *__pyx_r = NULL;
26839  __Pyx_RefNannyDeclarations
26840  PyObject *__pyx_t_1 = NULL;
26841  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
26842 
26843  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
26844  *
26845  * cdef inline object PyArray_MultiIterNew3(a, b, c):
26846  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
26847  *
26848  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26849  */
26850  __Pyx_XDECREF(__pyx_r);
26851  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 777, __pyx_L1_error)
26852  __Pyx_GOTREF(__pyx_t_1);
26853  __pyx_r = __pyx_t_1;
26854  __pyx_t_1 = 0;
26855  goto __pyx_L0;
26856 
26857  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
26858  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
26859  *
26860  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
26861  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26862  *
26863  */
26864 
26865  /* function exit code */
26866  __pyx_L1_error:;
26867  __Pyx_XDECREF(__pyx_t_1);
26868  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
26869  __pyx_r = 0;
26870  __pyx_L0:;
26871  __Pyx_XGIVEREF(__pyx_r);
26872  __Pyx_RefNannyFinishContext();
26873  return __pyx_r;
26874 }
26875 
26876 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
26877  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26878  *
26879  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
26880  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26881  *
26882  */
26883 
26884 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
26885  PyObject *__pyx_r = NULL;
26886  __Pyx_RefNannyDeclarations
26887  PyObject *__pyx_t_1 = NULL;
26888  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
26889 
26890  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
26891  *
26892  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
26893  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
26894  *
26895  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26896  */
26897  __Pyx_XDECREF(__pyx_r);
26898  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 780, __pyx_L1_error)
26899  __Pyx_GOTREF(__pyx_t_1);
26900  __pyx_r = __pyx_t_1;
26901  __pyx_t_1 = 0;
26902  goto __pyx_L0;
26903 
26904  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
26905  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
26906  *
26907  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
26908  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26909  *
26910  */
26911 
26912  /* function exit code */
26913  __pyx_L1_error:;
26914  __Pyx_XDECREF(__pyx_t_1);
26915  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
26916  __pyx_r = 0;
26917  __pyx_L0:;
26918  __Pyx_XGIVEREF(__pyx_r);
26919  __Pyx_RefNannyFinishContext();
26920  return __pyx_r;
26921 }
26922 
26923 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
26924  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26925  *
26926  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
26927  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26928  *
26929  */
26930 
26931 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
26932  PyObject *__pyx_r = NULL;
26933  __Pyx_RefNannyDeclarations
26934  PyObject *__pyx_t_1 = NULL;
26935  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
26936 
26937  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
26938  *
26939  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
26940  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
26941  *
26942  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
26943  */
26944  __Pyx_XDECREF(__pyx_r);
26945  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error)
26946  __Pyx_GOTREF(__pyx_t_1);
26947  __pyx_r = __pyx_t_1;
26948  __pyx_t_1 = 0;
26949  goto __pyx_L0;
26950 
26951  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
26952  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26953  *
26954  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
26955  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26956  *
26957  */
26958 
26959  /* function exit code */
26960  __pyx_L1_error:;
26961  __Pyx_XDECREF(__pyx_t_1);
26962  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
26963  __pyx_r = 0;
26964  __pyx_L0:;
26965  __Pyx_XGIVEREF(__pyx_r);
26966  __Pyx_RefNannyFinishContext();
26967  return __pyx_r;
26968 }
26969 
26970 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
26971  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26972  *
26973  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
26974  * # Recursive utility function used in __getbuffer__ to get format
26975  * # string. The new location in the format string is returned.
26976  */
26977 
26978 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
26979  PyArray_Descr *__pyx_v_child = 0;
26980  int __pyx_v_endian_detector;
26981  int __pyx_v_little_endian;
26982  PyObject *__pyx_v_fields = 0;
26983  PyObject *__pyx_v_childname = NULL;
26984  PyObject *__pyx_v_new_offset = NULL;
26985  PyObject *__pyx_v_t = NULL;
26986  char *__pyx_r;
26987  __Pyx_RefNannyDeclarations
26988  PyObject *__pyx_t_1 = NULL;
26989  Py_ssize_t __pyx_t_2;
26990  PyObject *__pyx_t_3 = NULL;
26991  PyObject *__pyx_t_4 = NULL;
26992  int __pyx_t_5;
26993  int __pyx_t_6;
26994  int __pyx_t_7;
26995  long __pyx_t_8;
26996  char *__pyx_t_9;
26997  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
26998 
26999  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
27000  *
27001  * cdef dtype child
27002  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
27003  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
27004  * cdef tuple fields
27005  */
27006  __pyx_v_endian_detector = 1;
27007 
27008  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
27009  * cdef dtype child
27010  * cdef int endian_detector = 1
27011  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
27012  * cdef tuple fields
27013  *
27014  */
27015  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
27016 
27017  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
27018  * cdef tuple fields
27019  *
27020  * for childname in descr.names: # <<<<<<<<<<<<<<
27021  * fields = descr.fields[childname]
27022  * child, new_offset = fields
27023  */
27024  if (unlikely(__pyx_v_descr->names == Py_None)) {
27025  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
27026  __PYX_ERR(1, 794, __pyx_L1_error)
27027  }
27028  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
27029  for (;;) {
27030  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
27031  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27032  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 794, __pyx_L1_error)
27033  #else
27034  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error)
27035  __Pyx_GOTREF(__pyx_t_3);
27036  #endif
27037  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
27038  __pyx_t_3 = 0;
27039 
27040  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
27041  *
27042  * for childname in descr.names:
27043  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
27044  * child, new_offset = fields
27045  *
27046  */
27047  if (unlikely(__pyx_v_descr->fields == Py_None)) {
27048  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
27049  __PYX_ERR(1, 795, __pyx_L1_error)
27050  }
27051  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 795, __pyx_L1_error)
27052  __Pyx_GOTREF(__pyx_t_3);
27053  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 795, __pyx_L1_error)
27054  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
27055  __pyx_t_3 = 0;
27056 
27057  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
27058  * for childname in descr.names:
27059  * fields = descr.fields[childname]
27060  * child, new_offset = fields # <<<<<<<<<<<<<<
27061  *
27062  * if (end - f) - <int>(new_offset - offset[0]) < 15:
27063  */
27064  if (likely(__pyx_v_fields != Py_None)) {
27065  PyObject* sequence = __pyx_v_fields;
27066  #if !CYTHON_COMPILING_IN_PYPY
27067  Py_ssize_t size = Py_SIZE(sequence);
27068  #else
27069  Py_ssize_t size = PySequence_Size(sequence);
27070  #endif
27071  if (unlikely(size != 2)) {
27072  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27073  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27074  __PYX_ERR(1, 796, __pyx_L1_error)
27075  }
27076  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27077  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
27078  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
27079  __Pyx_INCREF(__pyx_t_3);
27080  __Pyx_INCREF(__pyx_t_4);
27081  #else
27082  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error)
27083  __Pyx_GOTREF(__pyx_t_3);
27084  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 796, __pyx_L1_error)
27085  __Pyx_GOTREF(__pyx_t_4);
27086  #endif
27087  } else {
27088  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 796, __pyx_L1_error)
27089  }
27090  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 796, __pyx_L1_error)
27091  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
27092  __pyx_t_3 = 0;
27093  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
27094  __pyx_t_4 = 0;
27095 
27096  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
27097  * child, new_offset = fields
27098  *
27099  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
27100  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27101  *
27102  */
27103  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 798, __pyx_L1_error)
27104  __Pyx_GOTREF(__pyx_t_4);
27105  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
27106  __Pyx_GOTREF(__pyx_t_3);
27107  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27108  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 798, __pyx_L1_error)
27109  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27110  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
27111  if (__pyx_t_6) {
27112 
27113  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
27114  *
27115  * if (end - f) - <int>(new_offset - offset[0]) < 15:
27116  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
27117  *
27118  * if ((child.byteorder == c'>' and little_endian) or
27119  */
27120  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 799, __pyx_L1_error)
27121  __Pyx_GOTREF(__pyx_t_3);
27122  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27124  __PYX_ERR(1, 799, __pyx_L1_error)
27125 
27126  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
27127  * child, new_offset = fields
27128  *
27129  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
27130  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27131  *
27132  */
27133  }
27134 
27135  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27136  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27137  *
27138  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27139  * (child.byteorder == c'<' and not little_endian)):
27140  * raise ValueError(u"Non-native byte order not supported")
27141  */
27142  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
27143  if (!__pyx_t_7) {
27144  goto __pyx_L8_next_or;
27145  } else {
27146  }
27147  __pyx_t_7 = (__pyx_v_little_endian != 0);
27148  if (!__pyx_t_7) {
27149  } else {
27150  __pyx_t_6 = __pyx_t_7;
27151  goto __pyx_L7_bool_binop_done;
27152  }
27153  __pyx_L8_next_or:;
27154 
27155  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
27156  *
27157  * if ((child.byteorder == c'>' and little_endian) or
27158  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
27159  * raise ValueError(u"Non-native byte order not supported")
27160  * # One could encode it in the format string and have Cython
27161  */
27162  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
27163  if (__pyx_t_7) {
27164  } else {
27165  __pyx_t_6 = __pyx_t_7;
27166  goto __pyx_L7_bool_binop_done;
27167  }
27168  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
27169  __pyx_t_6 = __pyx_t_7;
27170  __pyx_L7_bool_binop_done:;
27171 
27172  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27173  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27174  *
27175  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27176  * (child.byteorder == c'<' and not little_endian)):
27177  * raise ValueError(u"Non-native byte order not supported")
27178  */
27179  if (__pyx_t_6) {
27180 
27181  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
27182  * if ((child.byteorder == c'>' and little_endian) or
27183  * (child.byteorder == c'<' and not little_endian)):
27184  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
27185  * # One could encode it in the format string and have Cython
27186  * # complain instead, BUT: < and > in format strings also imply
27187  */
27188  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 803, __pyx_L1_error)
27189  __Pyx_GOTREF(__pyx_t_3);
27190  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27191  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27192  __PYX_ERR(1, 803, __pyx_L1_error)
27193 
27194  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
27195  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
27196  *
27197  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
27198  * (child.byteorder == c'<' and not little_endian)):
27199  * raise ValueError(u"Non-native byte order not supported")
27200  */
27201  }
27202 
27203  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
27204  *
27205  * # Output padding bytes
27206  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
27207  * f[0] = 120 # "x"; pad byte
27208  * f += 1
27209  */
27210  while (1) {
27211  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 813, __pyx_L1_error)
27212  __Pyx_GOTREF(__pyx_t_3);
27213  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 813, __pyx_L1_error)
27214  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27215  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 813, __pyx_L1_error)
27216  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27217  if (!__pyx_t_6) break;
27218 
27219  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
27220  * # Output padding bytes
27221  * while offset[0] < new_offset:
27222  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
27223  * f += 1
27224  * offset[0] += 1
27225  */
27226  (__pyx_v_f[0]) = 0x78;
27227 
27228  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
27229  * while offset[0] < new_offset:
27230  * f[0] = 120 # "x"; pad byte
27231  * f += 1 # <<<<<<<<<<<<<<
27232  * offset[0] += 1
27233  *
27234  */
27235  __pyx_v_f = (__pyx_v_f + 1);
27236 
27237  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
27238  * f[0] = 120 # "x"; pad byte
27239  * f += 1
27240  * offset[0] += 1 # <<<<<<<<<<<<<<
27241  *
27242  * offset[0] += child.itemsize
27243  */
27244  __pyx_t_8 = 0;
27245  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
27246  }
27247 
27248  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
27249  * offset[0] += 1
27250  *
27251  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
27252  *
27253  * if not PyDataType_HASFIELDS(child):
27254  */
27255  __pyx_t_8 = 0;
27256  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
27257 
27258  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
27259  * offset[0] += child.itemsize
27260  *
27261  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
27262  * t = child.type_num
27263  * if end - f < 5:
27264  */
27265  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
27266  if (__pyx_t_6) {
27267 
27268  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
27269  *
27270  * if not PyDataType_HASFIELDS(child):
27271  * t = child.type_num # <<<<<<<<<<<<<<
27272  * if end - f < 5:
27273  * raise RuntimeError(u"Format string allocated too short.")
27274  */
27275  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 821, __pyx_L1_error)
27276  __Pyx_GOTREF(__pyx_t_4);
27277  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
27278  __pyx_t_4 = 0;
27279 
27280  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
27281  * if not PyDataType_HASFIELDS(child):
27282  * t = child.type_num
27283  * if end - f < 5: # <<<<<<<<<<<<<<
27284  * raise RuntimeError(u"Format string allocated too short.")
27285  *
27286  */
27287  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
27288  if (__pyx_t_6) {
27289 
27290  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
27291  * t = child.type_num
27292  * if end - f < 5:
27293  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
27294  *
27295  * # Until ticket #99 is fixed, use integers to avoid warnings
27296  */
27297  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 823, __pyx_L1_error)
27298  __Pyx_GOTREF(__pyx_t_4);
27299  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
27300  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27301  __PYX_ERR(1, 823, __pyx_L1_error)
27302 
27303  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
27304  * if not PyDataType_HASFIELDS(child):
27305  * t = child.type_num
27306  * if end - f < 5: # <<<<<<<<<<<<<<
27307  * raise RuntimeError(u"Format string allocated too short.")
27308  *
27309  */
27310  }
27311 
27312  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
27313  *
27314  * # Until ticket #99 is fixed, use integers to avoid warnings
27315  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
27316  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27317  * elif t == NPY_SHORT: f[0] = 104 #"h"
27318  */
27319  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 826, __pyx_L1_error)
27320  __Pyx_GOTREF(__pyx_t_4);
27321  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 826, __pyx_L1_error)
27322  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27323  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
27324  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27325  if (__pyx_t_6) {
27326  (__pyx_v_f[0]) = 98;
27327  goto __pyx_L15;
27328  }
27329 
27330  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
27331  * # Until ticket #99 is fixed, use integers to avoid warnings
27332  * if t == NPY_BYTE: f[0] = 98 #"b"
27333  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
27334  * elif t == NPY_SHORT: f[0] = 104 #"h"
27335  * elif t == NPY_USHORT: f[0] = 72 #"H"
27336  */
27337  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 827, __pyx_L1_error)
27338  __Pyx_GOTREF(__pyx_t_3);
27339  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 827, __pyx_L1_error)
27340  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27341  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 827, __pyx_L1_error)
27342  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27343  if (__pyx_t_6) {
27344  (__pyx_v_f[0]) = 66;
27345  goto __pyx_L15;
27346  }
27347 
27348  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
27349  * if t == NPY_BYTE: f[0] = 98 #"b"
27350  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27351  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
27352  * elif t == NPY_USHORT: f[0] = 72 #"H"
27353  * elif t == NPY_INT: f[0] = 105 #"i"
27354  */
27355  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 828, __pyx_L1_error)
27356  __Pyx_GOTREF(__pyx_t_4);
27357  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 828, __pyx_L1_error)
27358  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27359  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 828, __pyx_L1_error)
27360  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27361  if (__pyx_t_6) {
27362  (__pyx_v_f[0]) = 0x68;
27363  goto __pyx_L15;
27364  }
27365 
27366  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
27367  * elif t == NPY_UBYTE: f[0] = 66 #"B"
27368  * elif t == NPY_SHORT: f[0] = 104 #"h"
27369  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
27370  * elif t == NPY_INT: f[0] = 105 #"i"
27371  * elif t == NPY_UINT: f[0] = 73 #"I"
27372  */
27373  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 829, __pyx_L1_error)
27374  __Pyx_GOTREF(__pyx_t_3);
27375  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 829, __pyx_L1_error)
27376  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27377  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 829, __pyx_L1_error)
27378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27379  if (__pyx_t_6) {
27380  (__pyx_v_f[0]) = 72;
27381  goto __pyx_L15;
27382  }
27383 
27384  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
27385  * elif t == NPY_SHORT: f[0] = 104 #"h"
27386  * elif t == NPY_USHORT: f[0] = 72 #"H"
27387  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
27388  * elif t == NPY_UINT: f[0] = 73 #"I"
27389  * elif t == NPY_LONG: f[0] = 108 #"l"
27390  */
27391  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 830, __pyx_L1_error)
27392  __Pyx_GOTREF(__pyx_t_4);
27393  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 830, __pyx_L1_error)
27394  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27395  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 830, __pyx_L1_error)
27396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27397  if (__pyx_t_6) {
27398  (__pyx_v_f[0]) = 0x69;
27399  goto __pyx_L15;
27400  }
27401 
27402  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
27403  * elif t == NPY_USHORT: f[0] = 72 #"H"
27404  * elif t == NPY_INT: f[0] = 105 #"i"
27405  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
27406  * elif t == NPY_LONG: f[0] = 108 #"l"
27407  * elif t == NPY_ULONG: f[0] = 76 #"L"
27408  */
27409  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 831, __pyx_L1_error)
27410  __Pyx_GOTREF(__pyx_t_3);
27411  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 831, __pyx_L1_error)
27412  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27413  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
27414  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27415  if (__pyx_t_6) {
27416  (__pyx_v_f[0]) = 73;
27417  goto __pyx_L15;
27418  }
27419 
27420  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
27421  * elif t == NPY_INT: f[0] = 105 #"i"
27422  * elif t == NPY_UINT: f[0] = 73 #"I"
27423  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
27424  * elif t == NPY_ULONG: f[0] = 76 #"L"
27425  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27426  */
27427  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 832, __pyx_L1_error)
27428  __Pyx_GOTREF(__pyx_t_4);
27429  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 832, __pyx_L1_error)
27430  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27431  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
27432  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27433  if (__pyx_t_6) {
27434  (__pyx_v_f[0]) = 0x6C;
27435  goto __pyx_L15;
27436  }
27437 
27438  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
27439  * elif t == NPY_UINT: f[0] = 73 #"I"
27440  * elif t == NPY_LONG: f[0] = 108 #"l"
27441  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
27442  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27443  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27444  */
27445  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 833, __pyx_L1_error)
27446  __Pyx_GOTREF(__pyx_t_3);
27447  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 833, __pyx_L1_error)
27448  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27449  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 833, __pyx_L1_error)
27450  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27451  if (__pyx_t_6) {
27452  (__pyx_v_f[0]) = 76;
27453  goto __pyx_L15;
27454  }
27455 
27456  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
27457  * elif t == NPY_LONG: f[0] = 108 #"l"
27458  * elif t == NPY_ULONG: f[0] = 76 #"L"
27459  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
27460  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27461  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27462  */
27463  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 834, __pyx_L1_error)
27464  __Pyx_GOTREF(__pyx_t_4);
27465  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 834, __pyx_L1_error)
27466  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27467  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 834, __pyx_L1_error)
27468  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27469  if (__pyx_t_6) {
27470  (__pyx_v_f[0]) = 0x71;
27471  goto __pyx_L15;
27472  }
27473 
27474  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
27475  * elif t == NPY_ULONG: f[0] = 76 #"L"
27476  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27477  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
27478  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27479  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27480  */
27481  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 835, __pyx_L1_error)
27482  __Pyx_GOTREF(__pyx_t_3);
27483  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 835, __pyx_L1_error)
27484  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27485  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 835, __pyx_L1_error)
27486  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27487  if (__pyx_t_6) {
27488  (__pyx_v_f[0]) = 81;
27489  goto __pyx_L15;
27490  }
27491 
27492  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
27493  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
27494  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27495  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
27496  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27497  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27498  */
27499  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 836, __pyx_L1_error)
27500  __Pyx_GOTREF(__pyx_t_4);
27501  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 836, __pyx_L1_error)
27502  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27503  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 836, __pyx_L1_error)
27504  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27505  if (__pyx_t_6) {
27506  (__pyx_v_f[0]) = 0x66;
27507  goto __pyx_L15;
27508  }
27509 
27510  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
27511  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
27512  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27513  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
27514  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27515  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27516  */
27517  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 837, __pyx_L1_error)
27518  __Pyx_GOTREF(__pyx_t_3);
27519  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 837, __pyx_L1_error)
27520  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27521  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 837, __pyx_L1_error)
27522  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27523  if (__pyx_t_6) {
27524  (__pyx_v_f[0]) = 0x64;
27525  goto __pyx_L15;
27526  }
27527 
27528  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
27529  * elif t == NPY_FLOAT: f[0] = 102 #"f"
27530  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27531  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
27532  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27533  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27534  */
27535  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 838, __pyx_L1_error)
27536  __Pyx_GOTREF(__pyx_t_4);
27537  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 838, __pyx_L1_error)
27538  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27539  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 838, __pyx_L1_error)
27540  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27541  if (__pyx_t_6) {
27542  (__pyx_v_f[0]) = 0x67;
27543  goto __pyx_L15;
27544  }
27545 
27546  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
27547  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
27548  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27549  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
27550  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27551  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27552  */
27553  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 839, __pyx_L1_error)
27554  __Pyx_GOTREF(__pyx_t_3);
27555  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 839, __pyx_L1_error)
27556  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27557  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 839, __pyx_L1_error)
27558  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27559  if (__pyx_t_6) {
27560  (__pyx_v_f[0]) = 90;
27561  (__pyx_v_f[1]) = 0x66;
27562  __pyx_v_f = (__pyx_v_f + 1);
27563  goto __pyx_L15;
27564  }
27565 
27566  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
27567  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
27568  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27569  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
27570  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27571  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27572  */
27573  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 840, __pyx_L1_error)
27574  __Pyx_GOTREF(__pyx_t_4);
27575  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 840, __pyx_L1_error)
27576  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27577  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 840, __pyx_L1_error)
27578  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27579  if (__pyx_t_6) {
27580  (__pyx_v_f[0]) = 90;
27581  (__pyx_v_f[1]) = 0x64;
27582  __pyx_v_f = (__pyx_v_f + 1);
27583  goto __pyx_L15;
27584  }
27585 
27586  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
27587  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
27588  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27589  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
27590  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27591  * else:
27592  */
27593  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 841, __pyx_L1_error)
27594  __Pyx_GOTREF(__pyx_t_3);
27595  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 841, __pyx_L1_error)
27596  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27597  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
27598  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27599  if (__pyx_t_6) {
27600  (__pyx_v_f[0]) = 90;
27601  (__pyx_v_f[1]) = 0x67;
27602  __pyx_v_f = (__pyx_v_f + 1);
27603  goto __pyx_L15;
27604  }
27605 
27606  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
27607  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
27608  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
27609  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
27610  * else:
27611  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27612  */
27613  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 842, __pyx_L1_error)
27614  __Pyx_GOTREF(__pyx_t_4);
27615  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 842, __pyx_L1_error)
27616  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27617  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 842, __pyx_L1_error)
27618  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27619  if (__pyx_t_6) {
27620  (__pyx_v_f[0]) = 79;
27621  goto __pyx_L15;
27622  }
27623 
27624  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
27625  * elif t == NPY_OBJECT: f[0] = 79 #"O"
27626  * else:
27627  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
27628  * f += 1
27629  * else:
27630  */
27631  /*else*/ {
27632  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
27633  __Pyx_GOTREF(__pyx_t_3);
27634  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __pyx_L1_error)
27635  __Pyx_GOTREF(__pyx_t_4);
27636  __Pyx_GIVEREF(__pyx_t_3);
27637  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
27638  __pyx_t_3 = 0;
27639  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
27640  __Pyx_GOTREF(__pyx_t_3);
27641  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27642  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
27643  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27644  __PYX_ERR(1, 844, __pyx_L1_error)
27645  }
27646  __pyx_L15:;
27647 
27648  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
27649  * else:
27650  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
27651  * f += 1 # <<<<<<<<<<<<<<
27652  * else:
27653  * # Cython ignores struct boundary information ("T{...}"),
27654  */
27655  __pyx_v_f = (__pyx_v_f + 1);
27656 
27657  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
27658  * offset[0] += child.itemsize
27659  *
27660  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
27661  * t = child.type_num
27662  * if end - f < 5:
27663  */
27664  goto __pyx_L13;
27665  }
27666 
27667  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
27668  * # Cython ignores struct boundary information ("T{...}"),
27669  * # so don't output it
27670  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
27671  * return f
27672  *
27673  */
27674  /*else*/ {
27675  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) __PYX_ERR(1, 849, __pyx_L1_error)
27676  __pyx_v_f = __pyx_t_9;
27677  }
27678  __pyx_L13:;
27679 
27680  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
27681  * cdef tuple fields
27682  *
27683  * for childname in descr.names: # <<<<<<<<<<<<<<
27684  * fields = descr.fields[childname]
27685  * child, new_offset = fields
27686  */
27687  }
27688  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27689 
27690  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
27691  * # so don't output it
27692  * f = _util_dtypestring(child, f, end, offset)
27693  * return f # <<<<<<<<<<<<<<
27694  *
27695  *
27696  */
27697  __pyx_r = __pyx_v_f;
27698  goto __pyx_L0;
27699 
27700  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
27701  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
27702  *
27703  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
27704  * # Recursive utility function used in __getbuffer__ to get format
27705  * # string. The new location in the format string is returned.
27706  */
27707 
27708  /* function exit code */
27709  __pyx_L1_error:;
27710  __Pyx_XDECREF(__pyx_t_1);
27711  __Pyx_XDECREF(__pyx_t_3);
27712  __Pyx_XDECREF(__pyx_t_4);
27713  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
27714  __pyx_r = NULL;
27715  __pyx_L0:;
27716  __Pyx_XDECREF((PyObject *)__pyx_v_child);
27717  __Pyx_XDECREF(__pyx_v_fields);
27718  __Pyx_XDECREF(__pyx_v_childname);
27719  __Pyx_XDECREF(__pyx_v_new_offset);
27720  __Pyx_XDECREF(__pyx_v_t);
27721  __Pyx_RefNannyFinishContext();
27722  return __pyx_r;
27723 }
27724 
27725 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
27726  *
27727  *
27728  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
27729  * cdef PyObject* baseptr
27730  * if base is None:
27731  */
27732 
27733 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
27734  PyObject *__pyx_v_baseptr;
27735  __Pyx_RefNannyDeclarations
27736  int __pyx_t_1;
27737  int __pyx_t_2;
27738  __Pyx_RefNannySetupContext("set_array_base", 0);
27739 
27740  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
27741  * cdef inline void set_array_base(ndarray arr, object base):
27742  * cdef PyObject* baseptr
27743  * if base is None: # <<<<<<<<<<<<<<
27744  * baseptr = NULL
27745  * else:
27746  */
27747  __pyx_t_1 = (__pyx_v_base == Py_None);
27748  __pyx_t_2 = (__pyx_t_1 != 0);
27749  if (__pyx_t_2) {
27750 
27751  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
27752  * cdef PyObject* baseptr
27753  * if base is None:
27754  * baseptr = NULL # <<<<<<<<<<<<<<
27755  * else:
27756  * Py_INCREF(base) # important to do this before decref below!
27757  */
27758  __pyx_v_baseptr = NULL;
27759 
27760  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
27761  * cdef inline void set_array_base(ndarray arr, object base):
27762  * cdef PyObject* baseptr
27763  * if base is None: # <<<<<<<<<<<<<<
27764  * baseptr = NULL
27765  * else:
27766  */
27767  goto __pyx_L3;
27768  }
27769 
27770  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
27771  * baseptr = NULL
27772  * else:
27773  * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
27774  * baseptr = <PyObject*>base
27775  * Py_XDECREF(arr.base)
27776  */
27777  /*else*/ {
27778  Py_INCREF(__pyx_v_base);
27779 
27780  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
27781  * else:
27782  * Py_INCREF(base) # important to do this before decref below!
27783  * baseptr = <PyObject*>base # <<<<<<<<<<<<<<
27784  * Py_XDECREF(arr.base)
27785  * arr.base = baseptr
27786  */
27787  __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
27788  }
27789  __pyx_L3:;
27790 
27791  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
27792  * Py_INCREF(base) # important to do this before decref below!
27793  * baseptr = <PyObject*>base
27794  * Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
27795  * arr.base = baseptr
27796  *
27797  */
27798  Py_XDECREF(__pyx_v_arr->base);
27799 
27800  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
27801  * baseptr = <PyObject*>base
27802  * Py_XDECREF(arr.base)
27803  * arr.base = baseptr # <<<<<<<<<<<<<<
27804  *
27805  * cdef inline object get_array_base(ndarray arr):
27806  */
27807  __pyx_v_arr->base = __pyx_v_baseptr;
27808 
27809  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
27810  *
27811  *
27812  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
27813  * cdef PyObject* baseptr
27814  * if base is None:
27815  */
27816 
27817  /* function exit code */
27818  __Pyx_RefNannyFinishContext();
27819 }
27820 
27821 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
27822  * arr.base = baseptr
27823  *
27824  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
27825  * if arr.base is NULL:
27826  * return None
27827  */
27828 
27829 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
27830  PyObject *__pyx_r = NULL;
27831  __Pyx_RefNannyDeclarations
27832  int __pyx_t_1;
27833  __Pyx_RefNannySetupContext("get_array_base", 0);
27834 
27835  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
27836  *
27837  * cdef inline object get_array_base(ndarray arr):
27838  * if arr.base is NULL: # <<<<<<<<<<<<<<
27839  * return None
27840  * else:
27841  */
27842  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
27843  if (__pyx_t_1) {
27844 
27845  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
27846  * cdef inline object get_array_base(ndarray arr):
27847  * if arr.base is NULL:
27848  * return None # <<<<<<<<<<<<<<
27849  * else:
27850  * return <object>arr.base
27851  */
27852  __Pyx_XDECREF(__pyx_r);
27853  __Pyx_INCREF(Py_None);
27854  __pyx_r = Py_None;
27855  goto __pyx_L0;
27856 
27857  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
27858  *
27859  * cdef inline object get_array_base(ndarray arr):
27860  * if arr.base is NULL: # <<<<<<<<<<<<<<
27861  * return None
27862  * else:
27863  */
27864  }
27865 
27866  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
27867  * return None
27868  * else:
27869  * return <object>arr.base # <<<<<<<<<<<<<<
27870  *
27871  *
27872  */
27873  /*else*/ {
27874  __Pyx_XDECREF(__pyx_r);
27875  __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
27876  __pyx_r = ((PyObject *)__pyx_v_arr->base);
27877  goto __pyx_L0;
27878  }
27879 
27880  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
27881  * arr.base = baseptr
27882  *
27883  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
27884  * if arr.base is NULL:
27885  * return None
27886  */
27887 
27888  /* function exit code */
27889  __pyx_L0:;
27890  __Pyx_XGIVEREF(__pyx_r);
27891  __Pyx_RefNannyFinishContext();
27892  return __pyx_r;
27893 }
27894 
27895 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
27896  * # Versions of the import_* functions which are more suitable for
27897  * # Cython code.
27898  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
27899  * try:
27900  * _import_array()
27901  */
27902 
27903 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
27904  int __pyx_r;
27905  __Pyx_RefNannyDeclarations
27906  PyObject *__pyx_t_1 = NULL;
27907  PyObject *__pyx_t_2 = NULL;
27908  PyObject *__pyx_t_3 = NULL;
27909  int __pyx_t_4;
27910  PyObject *__pyx_t_5 = NULL;
27911  PyObject *__pyx_t_6 = NULL;
27912  PyObject *__pyx_t_7 = NULL;
27913  PyObject *__pyx_t_8 = NULL;
27914  __Pyx_RefNannySetupContext("import_array", 0);
27915 
27916  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27917  * # Cython code.
27918  * cdef inline int import_array() except -1:
27919  * try: # <<<<<<<<<<<<<<
27920  * _import_array()
27921  * except Exception:
27922  */
27923  {
27924  __Pyx_PyThreadState_declare
27925  __Pyx_PyThreadState_assign
27926  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27927  __Pyx_XGOTREF(__pyx_t_1);
27928  __Pyx_XGOTREF(__pyx_t_2);
27929  __Pyx_XGOTREF(__pyx_t_3);
27930  /*try:*/ {
27931 
27932  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":987
27933  * cdef inline int import_array() except -1:
27934  * try:
27935  * _import_array() # <<<<<<<<<<<<<<
27936  * except Exception:
27937  * raise ImportError("numpy.core.multiarray failed to import")
27938  */
27939  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 987, __pyx_L3_error)
27940 
27941  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27942  * # Cython code.
27943  * cdef inline int import_array() except -1:
27944  * try: # <<<<<<<<<<<<<<
27945  * _import_array()
27946  * except Exception:
27947  */
27948  }
27949  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27950  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27951  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27952  goto __pyx_L10_try_end;
27953  __pyx_L3_error:;
27954  __Pyx_PyThreadState_assign
27955 
27956  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":988
27957  * try:
27958  * _import_array()
27959  * except Exception: # <<<<<<<<<<<<<<
27960  * raise ImportError("numpy.core.multiarray failed to import")
27961  *
27962  */
27963  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27964  if (__pyx_t_4) {
27965  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27966  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 988, __pyx_L5_except_error)
27967  __Pyx_GOTREF(__pyx_t_5);
27968  __Pyx_GOTREF(__pyx_t_6);
27969  __Pyx_GOTREF(__pyx_t_7);
27970 
27971  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
27972  * _import_array()
27973  * except Exception:
27974  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
27975  *
27976  * cdef inline int import_umath() except -1:
27977  */
27978  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 989, __pyx_L5_except_error)
27979  __Pyx_GOTREF(__pyx_t_8);
27980  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27981  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27982  __PYX_ERR(1, 989, __pyx_L5_except_error)
27983  }
27984  goto __pyx_L5_except_error;
27985  __pyx_L5_except_error:;
27986 
27987  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":986
27988  * # Cython code.
27989  * cdef inline int import_array() except -1:
27990  * try: # <<<<<<<<<<<<<<
27991  * _import_array()
27992  * except Exception:
27993  */
27994  __Pyx_PyThreadState_assign
27995  __Pyx_XGIVEREF(__pyx_t_1);
27996  __Pyx_XGIVEREF(__pyx_t_2);
27997  __Pyx_XGIVEREF(__pyx_t_3);
27998  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27999  goto __pyx_L1_error;
28000  __pyx_L10_try_end:;
28001  }
28002 
28003  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":985
28004  * # Versions of the import_* functions which are more suitable for
28005  * # Cython code.
28006  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
28007  * try:
28008  * _import_array()
28009  */
28010 
28011  /* function exit code */
28012  __pyx_r = 0;
28013  goto __pyx_L0;
28014  __pyx_L1_error:;
28015  __Pyx_XDECREF(__pyx_t_5);
28016  __Pyx_XDECREF(__pyx_t_6);
28017  __Pyx_XDECREF(__pyx_t_7);
28018  __Pyx_XDECREF(__pyx_t_8);
28019  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
28020  __pyx_r = -1;
28021  __pyx_L0:;
28022  __Pyx_RefNannyFinishContext();
28023  return __pyx_r;
28024 }
28025 
28026 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
28027  * raise ImportError("numpy.core.multiarray failed to import")
28028  *
28029  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
28030  * try:
28031  * _import_umath()
28032  */
28033 
28034 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
28035  int __pyx_r;
28036  __Pyx_RefNannyDeclarations
28037  PyObject *__pyx_t_1 = NULL;
28038  PyObject *__pyx_t_2 = NULL;
28039  PyObject *__pyx_t_3 = NULL;
28040  int __pyx_t_4;
28041  PyObject *__pyx_t_5 = NULL;
28042  PyObject *__pyx_t_6 = NULL;
28043  PyObject *__pyx_t_7 = NULL;
28044  PyObject *__pyx_t_8 = NULL;
28045  __Pyx_RefNannySetupContext("import_umath", 0);
28046 
28047  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28048  *
28049  * cdef inline int import_umath() except -1:
28050  * try: # <<<<<<<<<<<<<<
28051  * _import_umath()
28052  * except Exception:
28053  */
28054  {
28055  __Pyx_PyThreadState_declare
28056  __Pyx_PyThreadState_assign
28057  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28058  __Pyx_XGOTREF(__pyx_t_1);
28059  __Pyx_XGOTREF(__pyx_t_2);
28060  __Pyx_XGOTREF(__pyx_t_3);
28061  /*try:*/ {
28062 
28063  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":993
28064  * cdef inline int import_umath() except -1:
28065  * try:
28066  * _import_umath() # <<<<<<<<<<<<<<
28067  * except Exception:
28068  * raise ImportError("numpy.core.umath failed to import")
28069  */
28070  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 993, __pyx_L3_error)
28071 
28072  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28073  *
28074  * cdef inline int import_umath() except -1:
28075  * try: # <<<<<<<<<<<<<<
28076  * _import_umath()
28077  * except Exception:
28078  */
28079  }
28080  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28081  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28082  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28083  goto __pyx_L10_try_end;
28084  __pyx_L3_error:;
28085  __Pyx_PyThreadState_assign
28086 
28087  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":994
28088  * try:
28089  * _import_umath()
28090  * except Exception: # <<<<<<<<<<<<<<
28091  * raise ImportError("numpy.core.umath failed to import")
28092  *
28093  */
28094  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
28095  if (__pyx_t_4) {
28096  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
28097  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 994, __pyx_L5_except_error)
28098  __Pyx_GOTREF(__pyx_t_5);
28099  __Pyx_GOTREF(__pyx_t_6);
28100  __Pyx_GOTREF(__pyx_t_7);
28101 
28102  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
28103  * _import_umath()
28104  * except Exception:
28105  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
28106  *
28107  * cdef inline int import_ufunc() except -1:
28108  */
28109  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 995, __pyx_L5_except_error)
28110  __Pyx_GOTREF(__pyx_t_8);
28111  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
28112  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
28113  __PYX_ERR(1, 995, __pyx_L5_except_error)
28114  }
28115  goto __pyx_L5_except_error;
28116  __pyx_L5_except_error:;
28117 
28118  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":992
28119  *
28120  * cdef inline int import_umath() except -1:
28121  * try: # <<<<<<<<<<<<<<
28122  * _import_umath()
28123  * except Exception:
28124  */
28125  __Pyx_PyThreadState_assign
28126  __Pyx_XGIVEREF(__pyx_t_1);
28127  __Pyx_XGIVEREF(__pyx_t_2);
28128  __Pyx_XGIVEREF(__pyx_t_3);
28129  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
28130  goto __pyx_L1_error;
28131  __pyx_L10_try_end:;
28132  }
28133 
28134  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":991
28135  * raise ImportError("numpy.core.multiarray failed to import")
28136  *
28137  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
28138  * try:
28139  * _import_umath()
28140  */
28141 
28142  /* function exit code */
28143  __pyx_r = 0;
28144  goto __pyx_L0;
28145  __pyx_L1_error:;
28146  __Pyx_XDECREF(__pyx_t_5);
28147  __Pyx_XDECREF(__pyx_t_6);
28148  __Pyx_XDECREF(__pyx_t_7);
28149  __Pyx_XDECREF(__pyx_t_8);
28150  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
28151  __pyx_r = -1;
28152  __pyx_L0:;
28153  __Pyx_RefNannyFinishContext();
28154  return __pyx_r;
28155 }
28156 
28157 /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
28158  * raise ImportError("numpy.core.umath failed to import")
28159  *
28160  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
28161  * try:
28162  * _import_umath()
28163  */
28164 
28165 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
28166  int __pyx_r;
28167  __Pyx_RefNannyDeclarations
28168  PyObject *__pyx_t_1 = NULL;
28169  PyObject *__pyx_t_2 = NULL;
28170  PyObject *__pyx_t_3 = NULL;
28171  int __pyx_t_4;
28172  PyObject *__pyx_t_5 = NULL;
28173  PyObject *__pyx_t_6 = NULL;
28174  PyObject *__pyx_t_7 = NULL;
28175  PyObject *__pyx_t_8 = NULL;
28176  __Pyx_RefNannySetupContext("import_ufunc", 0);
28177 
28178  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28179  *
28180  * cdef inline int import_ufunc() except -1:
28181  * try: # <<<<<<<<<<<<<<
28182  * _import_umath()
28183  * except Exception:
28184  */
28185  {
28186  __Pyx_PyThreadState_declare
28187  __Pyx_PyThreadState_assign
28188  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28189  __Pyx_XGOTREF(__pyx_t_1);
28190  __Pyx_XGOTREF(__pyx_t_2);
28191  __Pyx_XGOTREF(__pyx_t_3);
28192  /*try:*/ {
28193 
28194  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":999
28195  * cdef inline int import_ufunc() except -1:
28196  * try:
28197  * _import_umath() # <<<<<<<<<<<<<<
28198  * except Exception:
28199  * raise ImportError("numpy.core.umath failed to import")
28200  */
28201  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(1, 999, __pyx_L3_error)
28202 
28203  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28204  *
28205  * cdef inline int import_ufunc() except -1:
28206  * try: # <<<<<<<<<<<<<<
28207  * _import_umath()
28208  * except Exception:
28209  */
28210  }
28211  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28212  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28213  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28214  goto __pyx_L10_try_end;
28215  __pyx_L3_error:;
28216  __Pyx_PyThreadState_assign
28217 
28218  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1000
28219  * try:
28220  * _import_umath()
28221  * except Exception: # <<<<<<<<<<<<<<
28222  * raise ImportError("numpy.core.umath failed to import")
28223  */
28224  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
28225  if (__pyx_t_4) {
28226  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28227  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1000, __pyx_L5_except_error)
28228  __Pyx_GOTREF(__pyx_t_5);
28229  __Pyx_GOTREF(__pyx_t_6);
28230  __Pyx_GOTREF(__pyx_t_7);
28231 
28232  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
28233  * _import_umath()
28234  * except Exception:
28235  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
28236  */
28237  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1001, __pyx_L5_except_error)
28238  __Pyx_GOTREF(__pyx_t_8);
28239  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
28240  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
28241  __PYX_ERR(1, 1001, __pyx_L5_except_error)
28242  }
28243  goto __pyx_L5_except_error;
28244  __pyx_L5_except_error:;
28245 
28246  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":998
28247  *
28248  * cdef inline int import_ufunc() except -1:
28249  * try: # <<<<<<<<<<<<<<
28250  * _import_umath()
28251  * except Exception:
28252  */
28253  __Pyx_PyThreadState_assign
28254  __Pyx_XGIVEREF(__pyx_t_1);
28255  __Pyx_XGIVEREF(__pyx_t_2);
28256  __Pyx_XGIVEREF(__pyx_t_3);
28257  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
28258  goto __pyx_L1_error;
28259  __pyx_L10_try_end:;
28260  }
28261 
28262  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
28263  * raise ImportError("numpy.core.umath failed to import")
28264  *
28265  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
28266  * try:
28267  * _import_umath()
28268  */
28269 
28270  /* function exit code */
28271  __pyx_r = 0;
28272  goto __pyx_L0;
28273  __pyx_L1_error:;
28274  __Pyx_XDECREF(__pyx_t_5);
28275  __Pyx_XDECREF(__pyx_t_6);
28276  __Pyx_XDECREF(__pyx_t_7);
28277  __Pyx_XDECREF(__pyx_t_8);
28278  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
28279  __pyx_r = -1;
28280  __pyx_L0:;
28281  __Pyx_RefNannyFinishContext();
28282  return __pyx_r;
28283 }
28284 
28285 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k) {
28286  PyObject *o;
28287  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
28288  o = (*t->tp_alloc)(t, 0);
28289  } else {
28290  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
28291  }
28292  if (unlikely(!o)) return 0;
28293  if (unlikely(__pyx_pw_3ADR_3ADR_1__cinit__(o, a, k) < 0)) goto bad;
28294  return o;
28295  bad:
28296  Py_DECREF(o); o = 0;
28297  return NULL;
28298 }
28299 
28300 static void __pyx_tp_dealloc_3ADR_ADR(PyObject *o) {
28301  #if PY_VERSION_HEX >= 0x030400a1
28302  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
28303  if (PyObject_CallFinalizerFromDealloc(o)) return;
28304  }
28305  #endif
28306  {
28307  PyObject *etype, *eval, *etb;
28308  PyErr_Fetch(&etype, &eval, &etb);
28309  ++Py_REFCNT(o);
28310  __pyx_pw_3ADR_3ADR_3__dealloc__(o);
28311  --Py_REFCNT(o);
28312  PyErr_Restore(etype, eval, etb);
28313  }
28314  (*Py_TYPE(o)->tp_free)(o);
28315 }
28316 
28317 static PyMethodDef __pyx_methods_3ADR_ADR[] = {
28318  {"calculateResidual", (PyCFunction)__pyx_pw_3ADR_3ADR_5calculateResidual, METH_VARARGS|METH_KEYWORDS, 0},
28319  {"calculateJacobian", (PyCFunction)__pyx_pw_3ADR_3ADR_7calculateJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ADR_3ADR_6calculateJacobian},
28320  {0, 0, 0, 0}
28321 };
28322 
28323 static PyTypeObject __pyx_type_3ADR_ADR = {
28324  PyVarObject_HEAD_INIT(0, 0)
28325  "ADR.ADR", /*tp_name*/
28326  sizeof(struct __pyx_obj_3ADR_ADR), /*tp_basicsize*/
28327  0, /*tp_itemsize*/
28328  __pyx_tp_dealloc_3ADR_ADR, /*tp_dealloc*/
28329  0, /*tp_print*/
28330  0, /*tp_getattr*/
28331  0, /*tp_setattr*/
28332  #if PY_MAJOR_VERSION < 3
28333  0, /*tp_compare*/
28334  #endif
28335  #if PY_MAJOR_VERSION >= 3
28336  0, /*tp_as_async*/
28337  #endif
28338  0, /*tp_repr*/
28339  0, /*tp_as_number*/
28340  0, /*tp_as_sequence*/
28341  0, /*tp_as_mapping*/
28342  0, /*tp_hash*/
28343  0, /*tp_call*/
28344  0, /*tp_str*/
28345  0, /*tp_getattro*/
28346  0, /*tp_setattro*/
28347  0, /*tp_as_buffer*/
28348  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
28349  "\n Optimized ADR member functions\n ", /*tp_doc*/
28350  0, /*tp_traverse*/
28351  0, /*tp_clear*/
28352  0, /*tp_richcompare*/
28353  0, /*tp_weaklistoffset*/
28354  0, /*tp_iter*/
28355  0, /*tp_iternext*/
28356  __pyx_methods_3ADR_ADR, /*tp_methods*/
28357  0, /*tp_members*/
28358  0, /*tp_getset*/
28359  0, /*tp_base*/
28360  0, /*tp_dict*/
28361  0, /*tp_descr_get*/
28362  0, /*tp_descr_set*/
28363  0, /*tp_dictoffset*/
28364  0, /*tp_init*/
28365  0, /*tp_alloc*/
28366  __pyx_tp_new_3ADR_ADR, /*tp_new*/
28367  0, /*tp_free*/
28368  0, /*tp_is_gc*/
28369  0, /*tp_bases*/
28370  0, /*tp_mro*/
28371  0, /*tp_cache*/
28372  0, /*tp_subclasses*/
28373  0, /*tp_weaklist*/
28374  0, /*tp_del*/
28375  0, /*tp_version_tag*/
28376  #if PY_VERSION_HEX >= 0x030400a1
28377  0, /*tp_finalize*/
28378  #endif
28379 };
28380 
28381 static PyMethodDef __pyx_methods[] = {
28382  {0, 0, 0, 0}
28383 };
28384 
28385 #if PY_MAJOR_VERSION >= 3
28386 static struct PyModuleDef __pyx_moduledef = {
28387  #if PY_VERSION_HEX < 0x03020000
28388  { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
28389  #else
28390  PyModuleDef_HEAD_INIT,
28391  #endif
28392  "ADR",
28393  __pyx_k_An_optimized_Advection_Diffusio, /* m_doc */
28394  -1, /* m_size */
28395  __pyx_methods /* m_methods */,
28396  NULL, /* m_reload */
28397  NULL, /* m_traverse */
28398  NULL, /* m_clear */
28399  NULL /* m_free */
28400 };
28401 #endif
28402 
28403 static __Pyx_StringTabEntry __pyx_string_tab[] = {
28404  {&__pyx_n_s_ADR, __pyx_k_ADR, sizeof(__pyx_k_ADR), 0, 0, 1, 1},
28405  {&__pyx_kp_s_ADR_ShockCapturing_lagging_reque, __pyx_k_ADR_ShockCapturing_lagging_reque, sizeof(__pyx_k_ADR_ShockCapturing_lagging_reque), 0, 0, 1, 0},
28406  {&__pyx_kp_s_ADR_ShockCapturing_switched_to_l, __pyx_k_ADR_ShockCapturing_switched_to_l, sizeof(__pyx_k_ADR_ShockCapturing_switched_to_l), 0, 0, 1, 0},
28407  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi, __pyx_k_Advection_DiagonalUpwind_Diffusi, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi), 0, 0, 1, 1},
28408  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2, __pyx_k_Advection_DiagonalUpwind_Diffusi_2, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_2), 0, 0, 1, 1},
28409  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3, __pyx_k_Advection_DiagonalUpwind_Diffusi_3, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_3), 0, 0, 1, 1},
28410  {&__pyx_n_s_Archiver, __pyx_k_Archiver, sizeof(__pyx_k_Archiver), 0, 0, 1, 1},
28411  {&__pyx_kp_s_Building_time_integration_object, __pyx_k_Building_time_integration_object, sizeof(__pyx_k_Building_time_integration_object), 0, 0, 1, 0},
28412  {&__pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_k_C0_AffineLinearOnSimplexWithNoda, sizeof(__pyx_k_C0_AffineLinearOnSimplexWithNoda), 0, 0, 1, 1},
28413  {&__pyx_n_s_CT_sge, __pyx_k_CT_sge, sizeof(__pyx_k_CT_sge), 0, 0, 1, 1},
28414  {&__pyx_kp_s_Calculating_numerical_quadrature, __pyx_k_Calculating_numerical_quadrature, sizeof(__pyx_k_Calculating_numerical_quadrature), 0, 0, 1, 0},
28415  {&__pyx_n_s_Coefficients, __pyx_k_Coefficients, sizeof(__pyx_k_Coefficients), 0, 0, 1, 1},
28416  {&__pyx_n_s_Coefficients___init, __pyx_k_Coefficients___init, sizeof(__pyx_k_Coefficients___init), 0, 0, 1, 1},
28417  {&__pyx_n_s_Coefficients_evaluate, __pyx_k_Coefficients_evaluate, sizeof(__pyx_k_Coefficients_evaluate), 0, 0, 1, 1},
28418  {&__pyx_n_s_Coefficients_initializeElementBo, __pyx_k_Coefficients_initializeElementBo, sizeof(__pyx_k_Coefficients_initializeElementBo), 0, 0, 1, 1},
28419  {&__pyx_n_s_Coefficients_initializeElementQu, __pyx_k_Coefficients_initializeElementQu, sizeof(__pyx_k_Coefficients_initializeElementQu), 0, 0, 1, 1},
28420  {&__pyx_n_s_Coefficients_initializeGlobalExt, __pyx_k_Coefficients_initializeGlobalExt, sizeof(__pyx_k_Coefficients_initializeGlobalExt), 0, 0, 1, 1},
28421  {&__pyx_kp_s_Coefficients_of_linear_ADR_equa, __pyx_k_Coefficients_of_linear_ADR_equa, sizeof(__pyx_k_Coefficients_of_linear_ADR_equa), 0, 0, 1, 0},
28422  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
28423  {&__pyx_n_s_CompKernelFlag, __pyx_k_CompKernelFlag, sizeof(__pyx_k_CompKernelFlag), 0, 0, 1, 1},
28424  {&__pyx_n_s_DOFBoundaryConditions, __pyx_k_DOFBoundaryConditions, sizeof(__pyx_k_DOFBoundaryConditions), 0, 0, 1, 1},
28425  {&__pyx_n_s_FluxBoundaryConditions, __pyx_k_FluxBoundaryConditions, sizeof(__pyx_k_FluxBoundaryConditions), 0, 0, 1, 1},
28426  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
28427  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
28428  {&__pyx_kp_s_Global_residual, __pyx_k_Global_residual, sizeof(__pyx_k_Global_residual), 0, 0, 1, 0},
28429  {&__pyx_n_s_Hess, __pyx_k_Hess, sizeof(__pyx_k_Hess), 0, 0, 1, 1},
28430  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
28431  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
28432  {&__pyx_kp_s_Jacobian, __pyx_k_Jacobian, sizeof(__pyx_k_Jacobian), 0, 0, 1, 0},
28433  {&__pyx_n_s_L2projectEvaluate, __pyx_k_L2projectEvaluate, sizeof(__pyx_k_L2projectEvaluate), 0, 0, 1, 1},
28434  {&__pyx_n_s_LevelModel, __pyx_k_LevelModel, sizeof(__pyx_k_LevelModel), 0, 0, 1, 1},
28435  {&__pyx_n_s_LevelModel___init, __pyx_k_LevelModel___init, sizeof(__pyx_k_LevelModel___init), 0, 0, 1, 1},
28436  {&__pyx_n_s_LevelModel_calculateAuxiliaryQua, __pyx_k_LevelModel_calculateAuxiliaryQua, sizeof(__pyx_k_LevelModel_calculateAuxiliaryQua), 0, 0, 1, 1},
28437  {&__pyx_n_s_LevelModel_calculateCoefficients, __pyx_k_LevelModel_calculateCoefficients, sizeof(__pyx_k_LevelModel_calculateCoefficients), 0, 0, 1, 1},
28438  {&__pyx_n_s_LevelModel_calculateElementBound, __pyx_k_LevelModel_calculateElementBound, sizeof(__pyx_k_LevelModel_calculateElementBound), 0, 0, 1, 1},
28439  {&__pyx_n_s_LevelModel_calculateElementQuadr, __pyx_k_LevelModel_calculateElementQuadr, sizeof(__pyx_k_LevelModel_calculateElementQuadr), 0, 0, 1, 1},
28440  {&__pyx_n_s_LevelModel_calculateExteriorElem, __pyx_k_LevelModel_calculateExteriorElem, sizeof(__pyx_k_LevelModel_calculateExteriorElem), 0, 0, 1, 1},
28441  {&__pyx_n_s_LevelModel_calculateSolutionAtQu, __pyx_k_LevelModel_calculateSolutionAtQu, sizeof(__pyx_k_LevelModel_calculateSolutionAtQu), 0, 0, 1, 1},
28442  {&__pyx_n_s_LevelModel_estimate_mt, __pyx_k_LevelModel_estimate_mt, sizeof(__pyx_k_LevelModel_estimate_mt), 0, 0, 1, 1},
28443  {&__pyx_n_s_LevelModel_getJacobian, __pyx_k_LevelModel_getJacobian, sizeof(__pyx_k_LevelModel_getJacobian), 0, 0, 1, 1},
28444  {&__pyx_n_s_LevelModel_getResidual, __pyx_k_LevelModel_getResidual, sizeof(__pyx_k_LevelModel_getResidual), 0, 0, 1, 1},
28445  {&__pyx_n_s_MOVING_DOMAIN, __pyx_k_MOVING_DOMAIN, sizeof(__pyx_k_MOVING_DOMAIN), 0, 0, 1, 1},
28446  {&__pyx_kp_s_Mass_Conservation_Error, __pyx_k_Mass_Conservation_Error, sizeof(__pyx_k_Mass_Conservation_Error), 0, 0, 1, 0},
28447  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
28448  {&__pyx_n_s_NonlinearEquation, __pyx_k_NonlinearEquation, sizeof(__pyx_k_NonlinearEquation), 0, 0, 1, 1},
28449  {&__pyx_n_s_NumericalFlux, __pyx_k_NumericalFlux, sizeof(__pyx_k_NumericalFlux), 0, 0, 1, 1},
28450  {&__pyx_n_s_NumericalFlux_IIPG, __pyx_k_NumericalFlux_IIPG, sizeof(__pyx_k_NumericalFlux_IIPG), 0, 0, 1, 1},
28451  {&__pyx_n_s_NumericalFlux_IIPG___init, __pyx_k_NumericalFlux_IIPG___init, sizeof(__pyx_k_NumericalFlux_IIPG___init), 0, 0, 1, 1},
28452  {&__pyx_n_s_NumericalFlux_NIPG, __pyx_k_NumericalFlux_NIPG, sizeof(__pyx_k_NumericalFlux_NIPG), 0, 0, 1, 1},
28453  {&__pyx_n_s_NumericalFlux_NIPG___init, __pyx_k_NumericalFlux_NIPG___init, sizeof(__pyx_k_NumericalFlux_NIPG___init), 0, 0, 1, 1},
28454  {&__pyx_n_s_NumericalFlux_SIPG, __pyx_k_NumericalFlux_SIPG, sizeof(__pyx_k_NumericalFlux_SIPG), 0, 0, 1, 1},
28455  {&__pyx_n_s_NumericalFlux_SIPG___init, __pyx_k_NumericalFlux_SIPG___init, sizeof(__pyx_k_NumericalFlux_SIPG___init), 0, 0, 1, 1},
28456  {&__pyx_n_s_OneLevelTransport, __pyx_k_OneLevelTransport, sizeof(__pyx_k_OneLevelTransport), 0, 0, 1, 1},
28457  {&__pyx_kp_s_Optimized_LevelModel_for_ADR_eq, __pyx_k_Optimized_LevelModel_for_ADR_eq, sizeof(__pyx_k_Optimized_LevelModel_for_ADR_eq), 0, 0, 1, 0},
28458  {&__pyx_n_s_PostProcessingTools, __pyx_k_PostProcessingTools, sizeof(__pyx_k_PostProcessingTools), 0, 0, 1, 1},
28459  {&__pyx_n_s_Quadrature, __pyx_k_Quadrature, sizeof(__pyx_k_Quadrature), 0, 0, 1, 1},
28460  {&__pyx_kp_s_Residual_based_shock_capturing, __pyx_k_Residual_based_shock_capturing, sizeof(__pyx_k_Residual_based_shock_capturing), 0, 0, 1, 0},
28461  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
28462  {&__pyx_n_s_SGE_base, __pyx_k_SGE_base, sizeof(__pyx_k_SGE_base), 0, 0, 1, 1},
28463  {&__pyx_n_s_ShockCapturing, __pyx_k_ShockCapturing, sizeof(__pyx_k_ShockCapturing), 0, 0, 1, 1},
28464  {&__pyx_n_s_ShockCapturing___init, __pyx_k_ShockCapturing___init, sizeof(__pyx_k_ShockCapturing___init), 0, 0, 1, 1},
28465  {&__pyx_n_s_ShockCapturing_base, __pyx_k_ShockCapturing_base, sizeof(__pyx_k_ShockCapturing_base), 0, 0, 1, 1},
28466  {&__pyx_n_s_ShockCapturing_initializeElement, __pyx_k_ShockCapturing_initializeElement, sizeof(__pyx_k_ShockCapturing_initializeElement), 0, 0, 1, 1},
28467  {&__pyx_n_s_ShockCapturing_updateShockCaptur, __pyx_k_ShockCapturing_updateShockCaptur, sizeof(__pyx_k_ShockCapturing_updateShockCaptur), 0, 0, 1, 1},
28468  {&__pyx_n_s_SimplexLobattoQuadrature, __pyx_k_SimplexLobattoQuadrature, sizeof(__pyx_k_SimplexLobattoQuadrature), 0, 0, 1, 1},
28469  {&__pyx_n_s_SubgridError, __pyx_k_SubgridError, sizeof(__pyx_k_SubgridError), 0, 0, 1, 1},
28470  {&__pyx_n_s_SubgridError___init, __pyx_k_SubgridError___init, sizeof(__pyx_k_SubgridError___init), 0, 0, 1, 1},
28471  {&__pyx_kp_s_SubgridError_approximation_for, __pyx_k_SubgridError_approximation_for, sizeof(__pyx_k_SubgridError_approximation_for), 0, 0, 1, 0},
28472  {&__pyx_n_s_SubgridError_calculateSubgridErr, __pyx_k_SubgridError_calculateSubgridErr, sizeof(__pyx_k_SubgridError_calculateSubgridErr), 0, 0, 1, 1},
28473  {&__pyx_n_s_SubgridError_initializeElementQu, __pyx_k_SubgridError_initializeElementQu, sizeof(__pyx_k_SubgridError_initializeElementQu), 0, 0, 1, 1},
28474  {&__pyx_n_s_SubgridError_updateSubgridErrorH, __pyx_k_SubgridError_updateSubgridErrorH, sizeof(__pyx_k_SubgridError_updateSubgridErrorH), 0, 0, 1, 1},
28475  {&__pyx_n_s_TC_base, __pyx_k_TC_base, sizeof(__pyx_k_TC_base), 0, 0, 1, 1},
28476  {&__pyx_n_s_TimeIntegration, __pyx_k_TimeIntegration, sizeof(__pyx_k_TimeIntegration), 0, 0, 1, 1},
28477  {&__pyx_n_s_TimeIntegrationClass, __pyx_k_TimeIntegrationClass, sizeof(__pyx_k_TimeIntegrationClass), 0, 0, 1, 1},
28478  {&__pyx_n_s_Transport, __pyx_k_Transport, sizeof(__pyx_k_Transport), 0, 0, 1, 1},
28479  {&__pyx_kp_s_Updating_local_to_global_mapping, __pyx_k_Updating_local_to_global_mapping, sizeof(__pyx_k_Updating_local_to_global_mapping), 0, 0, 1, 0},
28480  {&__pyx_kp_s_VOF_max_numDiff_e, __pyx_k_VOF_max_numDiff_e, sizeof(__pyx_k_VOF_max_numDiff_e), 0, 0, 1, 0},
28481  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
28482  {&__pyx_n_s_VelocityPostProcessingChooser, __pyx_k_VelocityPostProcessingChooser, sizeof(__pyx_k_VelocityPostProcessingChooser), 0, 0, 1, 1},
28483  {&__pyx_n_s_XdmfWriter, __pyx_k_XdmfWriter, sizeof(__pyx_k_XdmfWriter), 0, 0, 1, 1},
28484  {&__pyx_kp_s_You_must_use_a_numerical_flux_to, __pyx_k_You_must_use_a_numerical_flux_to, sizeof(__pyx_k_You_must_use_a_numerical_flux_to), 0, 0, 1, 0},
28485  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
28486  {&__pyx_n_s_aOfX, __pyx_k_aOfX, sizeof(__pyx_k_aOfX), 0, 0, 1, 1},
28487  {&__pyx_n_s_adjoint_sigma, __pyx_k_adjoint_sigma, sizeof(__pyx_k_adjoint_sigma), 0, 0, 1, 1},
28488  {&__pyx_n_s_adr, __pyx_k_adr, sizeof(__pyx_k_adr), 0, 0, 1, 1},
28489  {&__pyx_n_s_advection, __pyx_k_advection, sizeof(__pyx_k_advection), 0, 0, 1, 1},
28490  {&__pyx_n_s_advectiveFluxBoundaryConditionsD, __pyx_k_advectiveFluxBoundaryConditionsD, sizeof(__pyx_k_advectiveFluxBoundaryConditionsD), 0, 0, 1, 1},
28491  {&__pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_k_advectiveFluxBoundaryConditionsS, sizeof(__pyx_k_advectiveFluxBoundaryConditionsS), 0, 0, 1, 1},
28492  {&__pyx_n_s_advectiveFlux_bc, __pyx_k_advectiveFlux_bc, sizeof(__pyx_k_advectiveFlux_bc), 0, 0, 1, 1},
28493  {&__pyx_n_s_advectiveFlux_bc_flag, __pyx_k_advectiveFlux_bc_flag, sizeof(__pyx_k_advectiveFlux_bc_flag), 0, 0, 1, 1},
28494  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
28495  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
28496  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
28497  {&__pyx_n_s_boundaryAdjoint_sigma, __pyx_k_boundaryAdjoint_sigma, sizeof(__pyx_k_boundaryAdjoint_sigma), 0, 0, 1, 1},
28498  {&__pyx_n_s_boundaryJac_ref, __pyx_k_boundaryJac_ref, sizeof(__pyx_k_boundaryJac_ref), 0, 0, 1, 1},
28499  {&__pyx_n_s_boundaryJacobians, __pyx_k_boundaryJacobians, sizeof(__pyx_k_boundaryJacobians), 0, 0, 1, 1},
28500  {&__pyx_n_s_boundaryNormals, __pyx_k_boundaryNormals, sizeof(__pyx_k_boundaryNormals), 0, 0, 1, 1},
28501  {&__pyx_n_s_buildUnion, __pyx_k_buildUnion, sizeof(__pyx_k_buildUnion), 0, 0, 1, 1},
28502  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
28503  {&__pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_k_calculateAuxiliaryQuantitiesAfte, sizeof(__pyx_k_calculateAuxiliaryQuantitiesAfte), 0, 0, 1, 1},
28504  {&__pyx_n_s_calculateCoefficients, __pyx_k_calculateCoefficients, sizeof(__pyx_k_calculateCoefficients), 0, 0, 1, 1},
28505  {&__pyx_n_s_calculateElementBoundaryQuadratu, __pyx_k_calculateElementBoundaryQuadratu, sizeof(__pyx_k_calculateElementBoundaryQuadratu), 0, 0, 1, 1},
28506  {&__pyx_n_s_calculateElementQuadrature, __pyx_k_calculateElementQuadrature, sizeof(__pyx_k_calculateElementQuadrature), 0, 0, 1, 1},
28507  {&__pyx_n_s_calculateExteriorElementBoundary, __pyx_k_calculateExteriorElementBoundary, sizeof(__pyx_k_calculateExteriorElementBoundary), 0, 0, 1, 1},
28508  {&__pyx_n_s_calculateJacobian, __pyx_k_calculateJacobian, sizeof(__pyx_k_calculateJacobian), 0, 0, 1, 1},
28509  {&__pyx_n_s_calculateQuadrature, __pyx_k_calculateQuadrature, sizeof(__pyx_k_calculateQuadrature), 0, 0, 1, 1},
28510  {&__pyx_n_s_calculateResidual, __pyx_k_calculateResidual, sizeof(__pyx_k_calculateResidual), 0, 0, 1, 1},
28511  {&__pyx_n_s_calculateSolutionAtQuadrature, __pyx_k_calculateSolutionAtQuadrature, sizeof(__pyx_k_calculateSolutionAtQuadrature), 0, 0, 1, 1},
28512  {&__pyx_n_s_calculateSubgridError, __pyx_k_calculateSubgridError, sizeof(__pyx_k_calculateSubgridError), 0, 0, 1, 1},
28513  {&__pyx_n_s_cebq, __pyx_k_cebq, sizeof(__pyx_k_cebq), 0, 0, 1, 1},
28514  {&__pyx_n_s_cebq_global, __pyx_k_cebq_global, sizeof(__pyx_k_cebq_global), 0, 0, 1, 1},
28515  {&__pyx_n_s_cebqe, __pyx_k_cebqe, sizeof(__pyx_k_cebqe), 0, 0, 1, 1},
28516  {&__pyx_n_s_cfemIntegrals, __pyx_k_cfemIntegrals, sizeof(__pyx_k_cfemIntegrals), 0, 0, 1, 1},
28517  {&__pyx_n_s_cfl, __pyx_k_cfl, sizeof(__pyx_k_cfl), 0, 0, 1, 1},
28518  {&__pyx_n_s_ci, __pyx_k_ci, sizeof(__pyx_k_ci), 0, 0, 1, 1},
28519  {&__pyx_n_s_cj, __pyx_k_cj, sizeof(__pyx_k_cj), 0, 0, 1, 1},
28520  {&__pyx_n_s_ck, __pyx_k_ck, sizeof(__pyx_k_ck), 0, 0, 1, 1},
28521  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
28522  {&__pyx_n_s_coefficients, __pyx_k_coefficients, sizeof(__pyx_k_coefficients), 0, 0, 1, 1},
28523  {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1},
28524  {&__pyx_n_s_compKernelFlag, __pyx_k_compKernelFlag, sizeof(__pyx_k_compKernelFlag), 0, 0, 1, 1},
28525  {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
28526  {&__pyx_n_s_conservativeFlux, __pyx_k_conservativeFlux, sizeof(__pyx_k_conservativeFlux), 0, 0, 1, 1},
28527  {&__pyx_n_s_conservativeFluxDict, __pyx_k_conservativeFluxDict, sizeof(__pyx_k_conservativeFluxDict), 0, 0, 1, 1},
28528  {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
28529  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
28530  {&__pyx_n_s_cq, __pyx_k_cq, sizeof(__pyx_k_cq), 0, 0, 1, 1},
28531  {&__pyx_n_s_csrColumnOffsets, __pyx_k_csrColumnOffsets, sizeof(__pyx_k_csrColumnOffsets), 0, 0, 1, 1},
28532  {&__pyx_n_s_csrColumnOffsets_eb, __pyx_k_csrColumnOffsets_eb, sizeof(__pyx_k_csrColumnOffsets_eb), 0, 0, 1, 1},
28533  {&__pyx_n_s_csrColumnOffsets_eb_u_u, __pyx_k_csrColumnOffsets_eb_u_u, sizeof(__pyx_k_csrColumnOffsets_eb_u_u), 0, 0, 1, 1},
28534  {&__pyx_n_s_csrColumnOffsets_u_u, __pyx_k_csrColumnOffsets_u_u, sizeof(__pyx_k_csrColumnOffsets_u_u), 0, 0, 1, 1},
28535  {&__pyx_n_s_csrRowIndeces, __pyx_k_csrRowIndeces, sizeof(__pyx_k_csrRowIndeces), 0, 0, 1, 1},
28536  {&__pyx_n_s_csrRowIndeces_u_u, __pyx_k_csrRowIndeces_u_u, sizeof(__pyx_k_csrRowIndeces_u_u), 0, 0, 1, 1},
28537  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
28538  {&__pyx_n_s_dS_ref, __pyx_k_dS_ref, sizeof(__pyx_k_dS_ref), 0, 0, 1, 1},
28539  {&__pyx_n_s_dV_ref, __pyx_k_dV_ref, sizeof(__pyx_k_dV_ref), 0, 0, 1, 1},
28540  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
28541  {&__pyx_n_s_dc, __pyx_k_dc, sizeof(__pyx_k_dc), 0, 0, 1, 1},
28542  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
28543  {&__pyx_n_s_defaultName, __pyx_k_defaultName, sizeof(__pyx_k_defaultName), 0, 0, 1, 1},
28544  {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
28545  {&__pyx_n_s_diffusion, __pyx_k_diffusion, sizeof(__pyx_k_diffusion), 0, 0, 1, 1},
28546  {&__pyx_n_s_diffusionDict, __pyx_k_diffusionDict, sizeof(__pyx_k_diffusionDict), 0, 0, 1, 1},
28547  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD, __pyx_k_diffusiveFluxBoundaryConditionsD, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD), 0, 0, 1, 1},
28548  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_k_diffusiveFluxBoundaryConditionsD_2, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD_2), 0, 0, 1, 1},
28549  {&__pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_k_diffusiveFluxBoundaryConditionsS, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsS), 0, 0, 1, 1},
28550  {&__pyx_n_s_diffusiveFlux_bc, __pyx_k_diffusiveFlux_bc, sizeof(__pyx_k_diffusiveFlux_bc), 0, 0, 1, 1},
28551  {&__pyx_n_s_diffusiveFlux_bc_flag, __pyx_k_diffusiveFlux_bc_flag, sizeof(__pyx_k_diffusiveFlux_bc_flag), 0, 0, 1, 1},
28552  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
28553  {&__pyx_n_s_dirichletConditions, __pyx_k_dirichletConditions, sizeof(__pyx_k_dirichletConditions), 0, 0, 1, 1},
28554  {&__pyx_n_s_dirichletConditionsForceDOF, __pyx_k_dirichletConditionsForceDOF, sizeof(__pyx_k_dirichletConditionsForceDOF), 0, 0, 1, 1},
28555  {&__pyx_n_s_dirichletNodeSetList, __pyx_k_dirichletNodeSetList, sizeof(__pyx_k_dirichletNodeSetList), 0, 0, 1, 1},
28556  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
28557  {&__pyx_n_s_dof, __pyx_k_dof, sizeof(__pyx_k_dof), 0, 0, 1, 1},
28558  {&__pyx_n_s_dofBoundaryConditionsDict, __pyx_k_dofBoundaryConditionsDict, sizeof(__pyx_k_dofBoundaryConditionsDict), 0, 0, 1, 1},
28559  {&__pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_k_dofBoundaryConditionsSetterDict, sizeof(__pyx_k_dofBoundaryConditionsSetterDict), 0, 0, 1, 1},
28560  {&__pyx_n_s_dofMap, __pyx_k_dofMap, sizeof(__pyx_k_dofMap), 0, 0, 1, 1},
28561  {&__pyx_n_s_dphi, __pyx_k_dphi, sizeof(__pyx_k_dphi), 0, 0, 1, 1},
28562  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
28563  {&__pyx_n_s_eN_global, __pyx_k_eN_global, sizeof(__pyx_k_eN_global), 0, 0, 1, 1},
28564  {&__pyx_n_s_ebN, __pyx_k_ebN, sizeof(__pyx_k_ebN), 0, 0, 1, 1},
28565  {&__pyx_n_s_ebNE, __pyx_k_ebNE, sizeof(__pyx_k_ebNE), 0, 0, 1, 1},
28566  {&__pyx_n_s_ebN_element, __pyx_k_ebN_element, sizeof(__pyx_k_ebN_element), 0, 0, 1, 1},
28567  {&__pyx_n_s_ebq, __pyx_k_ebq, sizeof(__pyx_k_ebq), 0, 0, 1, 1},
28568  {&__pyx_n_s_ebq_global, __pyx_k_ebq_global, sizeof(__pyx_k_ebq_global), 0, 0, 1, 1},
28569  {&__pyx_n_s_ebqe, __pyx_k_ebqe, sizeof(__pyx_k_ebqe), 0, 0, 1, 1},
28570  {&__pyx_n_s_ebqe_a, __pyx_k_ebqe_a, sizeof(__pyx_k_ebqe_a), 0, 0, 1, 1},
28571  {&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext, __pyx_k_ebqe_bc_advectiveFlux_u_ext, sizeof(__pyx_k_ebqe_bc_advectiveFlux_u_ext), 0, 0, 1, 1},
28572  {&__pyx_n_s_ebqe_bc_flux_u_ext, __pyx_k_ebqe_bc_flux_u_ext, sizeof(__pyx_k_ebqe_bc_flux_u_ext), 0, 0, 1, 1},
28573  {&__pyx_n_s_ebqe_bc_u_ext, __pyx_k_ebqe_bc_u_ext, sizeof(__pyx_k_ebqe_bc_u_ext), 0, 0, 1, 1},
28574  {&__pyx_n_s_ebqe_penalty, __pyx_k_ebqe_penalty, sizeof(__pyx_k_ebqe_penalty), 0, 0, 1, 1},
28575  {&__pyx_n_s_ebqe_v, __pyx_k_ebqe_v, sizeof(__pyx_k_ebqe_v), 0, 0, 1, 1},
28576  {&__pyx_n_s_elemQuadIsDict, __pyx_k_elemQuadIsDict, sizeof(__pyx_k_elemQuadIsDict), 0, 0, 1, 1},
28577  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
28578  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
28579  {&__pyx_n_s_elementBoundaryIntegralKeys, __pyx_k_elementBoundaryIntegralKeys, sizeof(__pyx_k_elementBoundaryIntegralKeys), 0, 0, 1, 1},
28580  {&__pyx_n_s_elementBoundaryIntegrals, __pyx_k_elementBoundaryIntegrals, sizeof(__pyx_k_elementBoundaryIntegrals), 0, 0, 1, 1},
28581  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
28582  {&__pyx_n_s_elementBoundaryQuadrature, __pyx_k_elementBoundaryQuadrature, sizeof(__pyx_k_elementBoundaryQuadrature), 0, 0, 1, 1},
28583  {&__pyx_n_s_elementBoundaryQuadratureDict, __pyx_k_elementBoundaryQuadratureDict, sizeof(__pyx_k_elementBoundaryQuadratureDict), 0, 0, 1, 1},
28584  {&__pyx_n_s_elementBoundaryQuadratureDiction, __pyx_k_elementBoundaryQuadratureDiction, sizeof(__pyx_k_elementBoundaryQuadratureDiction), 0, 0, 1, 1},
28585  {&__pyx_n_s_elementBoundaryQuadraturePoints, __pyx_k_elementBoundaryQuadraturePoints, sizeof(__pyx_k_elementBoundaryQuadraturePoints), 0, 0, 1, 1},
28586  {&__pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_k_elementBoundaryQuadratureRuleInd, sizeof(__pyx_k_elementBoundaryQuadratureRuleInd), 0, 0, 1, 1},
28587  {&__pyx_n_s_elementBoundaryQuadratureWeights, __pyx_k_elementBoundaryQuadratureWeights, sizeof(__pyx_k_elementBoundaryQuadratureWeights), 0, 0, 1, 1},
28588  {&__pyx_n_s_elementDiameter, __pyx_k_elementDiameter, sizeof(__pyx_k_elementDiameter), 0, 0, 1, 1},
28589  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
28590  {&__pyx_n_s_elementEffectiveDiametersArray, __pyx_k_elementEffectiveDiametersArray, sizeof(__pyx_k_elementEffectiveDiametersArray), 0, 0, 1, 1},
28591  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
28592  {&__pyx_n_s_elementIntegralKeys, __pyx_k_elementIntegralKeys, sizeof(__pyx_k_elementIntegralKeys), 0, 0, 1, 1},
28593  {&__pyx_n_s_elementMaps, __pyx_k_elementMaps, sizeof(__pyx_k_elementMaps), 0, 0, 1, 1},
28594  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
28595  {&__pyx_n_s_elementQuadrature, __pyx_k_elementQuadrature, sizeof(__pyx_k_elementQuadrature), 0, 0, 1, 1},
28596  {&__pyx_n_s_elementQuadratureDict, __pyx_k_elementQuadratureDict, sizeof(__pyx_k_elementQuadratureDict), 0, 0, 1, 1},
28597  {&__pyx_n_s_elementQuadratureDictionaryWrite, __pyx_k_elementQuadratureDictionaryWrite, sizeof(__pyx_k_elementQuadratureDictionaryWrite), 0, 0, 1, 1},
28598  {&__pyx_n_s_elementQuadraturePoints, __pyx_k_elementQuadraturePoints, sizeof(__pyx_k_elementQuadraturePoints), 0, 0, 1, 1},
28599  {&__pyx_n_s_elementQuadratureRuleIndeces, __pyx_k_elementQuadratureRuleIndeces, sizeof(__pyx_k_elementQuadratureRuleIndeces), 0, 0, 1, 1},
28600  {&__pyx_n_s_elementQuadratureWeights, __pyx_k_elementQuadratureWeights, sizeof(__pyx_k_elementQuadratureWeights), 0, 0, 1, 1},
28601  {&__pyx_kp_s_element_and_element_boundary_Jac, __pyx_k_element_and_element_boundary_Jac, sizeof(__pyx_k_element_and_element_boundary_Jac), 0, 0, 1, 0},
28602  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
28603  {&__pyx_n_s_estimate_mt, __pyx_k_estimate_mt, sizeof(__pyx_k_estimate_mt), 0, 0, 1, 1},
28604  {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1},
28605  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
28606  {&__pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_k_exteriorElementBoundaryQuadratur, sizeof(__pyx_k_exteriorElementBoundaryQuadratur), 0, 0, 1, 1},
28607  {&__pyx_n_s_fOfX, __pyx_k_fOfX, sizeof(__pyx_k_fOfX), 0, 0, 1, 1},
28608  {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
28609  {&__pyx_n_s_fbcObject, __pyx_k_fbcObject, sizeof(__pyx_k_fbcObject), 0, 0, 1, 1},
28610  {&__pyx_n_s_femSpace, __pyx_k_femSpace, sizeof(__pyx_k_femSpace), 0, 0, 1, 1},
28611  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
28612  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
28613  {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1},
28614  {&__pyx_n_s_fluxBoundaryConditions, __pyx_k_fluxBoundaryConditions, sizeof(__pyx_k_fluxBoundaryConditions), 0, 0, 1, 1},
28615  {&__pyx_n_s_fluxBoundaryConditionsDict, __pyx_k_fluxBoundaryConditionsDict, sizeof(__pyx_k_fluxBoundaryConditionsDict), 0, 0, 1, 1},
28616  {&__pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_k_fluxBoundaryConditionsObjectsDic, sizeof(__pyx_k_fluxBoundaryConditionsObjectsDic), 0, 0, 1, 1},
28617  {&__pyx_n_s_forceStrongConditions, __pyx_k_forceStrongConditions, sizeof(__pyx_k_forceStrongConditions), 0, 0, 1, 1},
28618  {&__pyx_n_s_forceStrongDirichlet, __pyx_k_forceStrongDirichlet, sizeof(__pyx_k_forceStrongDirichlet), 0, 0, 1, 1},
28619  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
28620  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
28621  {&__pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_k_getAdvectiveFluxBoundaryConditio, sizeof(__pyx_k_getAdvectiveFluxBoundaryConditio), 0, 0, 1, 1},
28622  {&__pyx_n_s_getBasisGradientValuesRef, __pyx_k_getBasisGradientValuesRef, sizeof(__pyx_k_getBasisGradientValuesRef), 0, 0, 1, 1},
28623  {&__pyx_n_s_getBasisGradientValuesTraceRef, __pyx_k_getBasisGradientValuesTraceRef, sizeof(__pyx_k_getBasisGradientValuesTraceRef), 0, 0, 1, 1},
28624  {&__pyx_n_s_getBasisValuesRef, __pyx_k_getBasisValuesRef, sizeof(__pyx_k_getBasisValuesRef), 0, 0, 1, 1},
28625  {&__pyx_n_s_getBasisValuesTraceRef, __pyx_k_getBasisValuesTraceRef, sizeof(__pyx_k_getBasisValuesTraceRef), 0, 0, 1, 1},
28626  {&__pyx_n_s_getCSRrepresentation, __pyx_k_getCSRrepresentation, sizeof(__pyx_k_getCSRrepresentation), 0, 0, 1, 1},
28627  {&__pyx_n_s_getDiffusiveFluxBoundaryConditio, __pyx_k_getDiffusiveFluxBoundaryConditio, sizeof(__pyx_k_getDiffusiveFluxBoundaryConditio), 0, 0, 1, 1},
28628  {&__pyx_n_s_getJacobian, __pyx_k_getJacobian, sizeof(__pyx_k_getJacobian), 0, 0, 1, 1},
28629  {&__pyx_n_s_getPointwiseBoundaryConditions, __pyx_k_getPointwiseBoundaryConditions, sizeof(__pyx_k_getPointwiseBoundaryConditions), 0, 0, 1, 1},
28630  {&__pyx_n_s_getResidual, __pyx_k_getResidual, sizeof(__pyx_k_getResidual), 0, 0, 1, 1},
28631  {&__pyx_n_s_getValues, __pyx_k_getValues, sizeof(__pyx_k_getValues), 0, 0, 1, 1},
28632  {&__pyx_n_s_getValuesGlobalExteriorTrace, __pyx_k_getValuesGlobalExteriorTrace, sizeof(__pyx_k_getValuesGlobalExteriorTrace), 0, 0, 1, 1},
28633  {&__pyx_n_s_globalJacobian, __pyx_k_globalJacobian, sizeof(__pyx_k_globalJacobian), 0, 0, 1, 1},
28634  {&__pyx_n_s_globalMax, __pyx_k_globalMax, sizeof(__pyx_k_globalMax), 0, 0, 1, 1},
28635  {&__pyx_n_s_globalResidual, __pyx_k_globalResidual, sizeof(__pyx_k_globalResidual), 0, 0, 1, 1},
28636  {&__pyx_n_s_globalSum, __pyx_k_globalSum, sizeof(__pyx_k_globalSum), 0, 0, 1, 1},
28637  {&__pyx_n_s_grad_psi, __pyx_k_grad_psi, sizeof(__pyx_k_grad_psi), 0, 0, 1, 1},
28638  {&__pyx_n_s_grad_psi_trace, __pyx_k_grad_psi_trace, sizeof(__pyx_k_grad_psi_trace), 0, 0, 1, 1},
28639  {&__pyx_kp_s_grad_u, __pyx_k_grad_u, sizeof(__pyx_k_grad_u), 0, 0, 1, 0},
28640  {&__pyx_n_s_hamiltonian, __pyx_k_hamiltonian, sizeof(__pyx_k_hamiltonian), 0, 0, 1, 1},
28641  {&__pyx_n_s_has_key, __pyx_k_has_key, sizeof(__pyx_k_has_key), 0, 0, 1, 1},
28642  {&__pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_k_home_cekees_proteus_proteus_ADR, sizeof(__pyx_k_home_cekees_proteus_proteus_ADR), 0, 0, 1, 0},
28643  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
28644  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
28645  {&__pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_k_inflowBC_internalNodes_updateLoc, sizeof(__pyx_k_inflowBC_internalNodes_updateLoc), 0, 0, 1, 0},
28646  {&__pyx_n_s_inflowBoundaryBC, __pyx_k_inflowBoundaryBC, sizeof(__pyx_k_inflowBoundaryBC), 0, 0, 1, 1},
28647  {&__pyx_n_s_inflowBoundaryBC_values, __pyx_k_inflowBoundaryBC_values, sizeof(__pyx_k_inflowBoundaryBC_values), 0, 0, 1, 1},
28648  {&__pyx_n_s_inflowFlux, __pyx_k_inflowFlux, sizeof(__pyx_k_inflowFlux), 0, 0, 1, 1},
28649  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
28650  {&__pyx_n_s_initializationPhase, __pyx_k_initializationPhase, sizeof(__pyx_k_initializationPhase), 0, 0, 1, 1},
28651  {&__pyx_n_s_initializeElementBoundaryQuadrat, __pyx_k_initializeElementBoundaryQuadrat, sizeof(__pyx_k_initializeElementBoundaryQuadrat), 0, 0, 1, 1},
28652  {&__pyx_n_s_initializeElementQuadrature, __pyx_k_initializeElementQuadrature, sizeof(__pyx_k_initializeElementQuadrature), 0, 0, 1, 1},
28653  {&__pyx_n_s_initializeGlobalExteriorElementB, __pyx_k_initializeGlobalExteriorElementB, sizeof(__pyx_k_initializeGlobalExteriorElementB), 0, 0, 1, 1},
28654  {&__pyx_n_s_initializeMesh, __pyx_k_initializeMesh, sizeof(__pyx_k_initializeMesh), 0, 0, 1, 1},
28655  {&__pyx_n_s_initializeTimeIntegration, __pyx_k_initializeTimeIntegration, sizeof(__pyx_k_initializeTimeIntegration), 0, 0, 1, 1},
28656  {&__pyx_n_s_integrateInterpolationPoints, __pyx_k_integrateInterpolationPoints, sizeof(__pyx_k_integrateInterpolationPoints), 0, 0, 1, 1},
28657  {&__pyx_n_s_internalNodes, __pyx_k_internalNodes, sizeof(__pyx_k_internalNodes), 0, 0, 1, 1},
28658  {&__pyx_n_s_internalNodesArray, __pyx_k_internalNodesArray, sizeof(__pyx_k_internalNodesArray), 0, 0, 1, 1},
28659  {&__pyx_n_s_interpolationConditions, __pyx_k_interpolationConditions, sizeof(__pyx_k_interpolationConditions), 0, 0, 1, 1},
28660  {&__pyx_n_s_isAdvectiveFluxBoundary_u, __pyx_k_isAdvectiveFluxBoundary_u, sizeof(__pyx_k_isAdvectiveFluxBoundary_u), 0, 0, 1, 1},
28661  {&__pyx_n_s_isDOFBoundary, __pyx_k_isDOFBoundary, sizeof(__pyx_k_isDOFBoundary), 0, 0, 1, 1},
28662  {&__pyx_n_s_isDOFBoundary_u, __pyx_k_isDOFBoundary_u, sizeof(__pyx_k_isDOFBoundary_u), 0, 0, 1, 1},
28663  {&__pyx_n_s_isFluxBoundary_u, __pyx_k_isFluxBoundary_u, sizeof(__pyx_k_isFluxBoundary_u), 0, 0, 1, 1},
28664  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
28665  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
28666  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
28667  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
28668  {&__pyx_n_s_l2g, __pyx_k_l2g, sizeof(__pyx_k_l2g), 0, 0, 1, 1},
28669  {&__pyx_n_s_l2proj, __pyx_k_l2proj, sizeof(__pyx_k_l2proj), 0, 0, 1, 1},
28670  {&__pyx_n_s_lag, __pyx_k_lag, sizeof(__pyx_k_lag), 0, 0, 1, 1},
28671  {&__pyx_n_s_lag_shockCapturing, __pyx_k_lag_shockCapturing, sizeof(__pyx_k_lag_shockCapturing), 0, 0, 1, 1},
28672  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
28673  {&__pyx_n_s_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 0, 1, 1},
28674  {&__pyx_n_s_localFunctionSpace, __pyx_k_localFunctionSpace, sizeof(__pyx_k_localFunctionSpace), 0, 0, 1, 1},
28675  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
28676  {&__pyx_n_s_logEvent, __pyx_k_logEvent, sizeof(__pyx_k_logEvent), 0, 0, 1, 1},
28677  {&__pyx_n_s_lowmem, __pyx_k_lowmem, sizeof(__pyx_k_lowmem), 0, 0, 1, 1},
28678  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
28679  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
28680  {&__pyx_n_s_mass, __pyx_k_mass, sizeof(__pyx_k_mass), 0, 0, 1, 1},
28681  {&__pyx_n_s_massConservationError, __pyx_k_massConservationError, sizeof(__pyx_k_massConservationError), 0, 0, 1, 1},
28682  {&__pyx_n_s_massLumping, __pyx_k_massLumping, sizeof(__pyx_k_massLumping), 0, 0, 1, 1},
28683  {&__pyx_n_s_matType, __pyx_k_matType, sizeof(__pyx_k_matType), 0, 0, 1, 1},
28684  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
28685  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
28686  {&__pyx_n_s_max_nDOF_element, __pyx_k_max_nDOF_element, sizeof(__pyx_k_max_nDOF_element), 0, 0, 1, 1},
28687  {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1},
28688  {&__pyx_n_s_mesh, __pyx_k_mesh, sizeof(__pyx_k_mesh), 0, 0, 1, 1},
28689  {&__pyx_n_s_mesh_dof, __pyx_k_mesh_dof, sizeof(__pyx_k_mesh_dof), 0, 0, 1, 1},
28690  {&__pyx_n_s_mesh_grad_trial_ref, __pyx_k_mesh_grad_trial_ref, sizeof(__pyx_k_mesh_grad_trial_ref), 0, 0, 1, 1},
28691  {&__pyx_n_s_mesh_grad_trial_trace_ref, __pyx_k_mesh_grad_trial_trace_ref, sizeof(__pyx_k_mesh_grad_trial_trace_ref), 0, 0, 1, 1},
28692  {&__pyx_n_s_mesh_l2g, __pyx_k_mesh_l2g, sizeof(__pyx_k_mesh_l2g), 0, 0, 1, 1},
28693  {&__pyx_n_s_mesh_trial_ref, __pyx_k_mesh_trial_ref, sizeof(__pyx_k_mesh_trial_ref), 0, 0, 1, 1},
28694  {&__pyx_n_s_mesh_trial_trace_ref, __pyx_k_mesh_trial_trace_ref, sizeof(__pyx_k_mesh_trial_trace_ref), 0, 0, 1, 1},
28695  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
28696  {&__pyx_n_s_mixedFlow, __pyx_k_mixedFlow, sizeof(__pyx_k_mixedFlow), 0, 0, 1, 1},
28697  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
28698  {&__pyx_n_s_movingDomain, __pyx_k_movingDomain, sizeof(__pyx_k_movingDomain), 0, 0, 1, 1},
28699  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
28700  {&__pyx_n_s_nCalls, __pyx_k_nCalls, sizeof(__pyx_k_nCalls), 0, 0, 1, 1},
28701  {&__pyx_n_s_nDOF_mesh_trial_elementIn, __pyx_k_nDOF_mesh_trial_elementIn, sizeof(__pyx_k_nDOF_mesh_trial_elementIn), 0, 0, 1, 1},
28702  {&__pyx_n_s_nDOF_phi_trial_element, __pyx_k_nDOF_phi_trial_element, sizeof(__pyx_k_nDOF_phi_trial_element), 0, 0, 1, 1},
28703  {&__pyx_n_s_nDOF_test_element, __pyx_k_nDOF_test_element, sizeof(__pyx_k_nDOF_test_element), 0, 0, 1, 1},
28704  {&__pyx_n_s_nDOF_test_elementIn, __pyx_k_nDOF_test_elementIn, sizeof(__pyx_k_nDOF_test_elementIn), 0, 0, 1, 1},
28705  {&__pyx_n_s_nDOF_trial_element, __pyx_k_nDOF_trial_element, sizeof(__pyx_k_nDOF_trial_element), 0, 0, 1, 1},
28706  {&__pyx_n_s_nDOF_trial_elementIn, __pyx_k_nDOF_trial_elementIn, sizeof(__pyx_k_nDOF_trial_elementIn), 0, 0, 1, 1},
28707  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
28708  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
28709  {&__pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_k_nElementBoundaryQuadraturePoints, sizeof(__pyx_k_nElementBoundaryQuadraturePoints), 0, 0, 1, 1},
28710  {&__pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_k_nElementBoundaryQuadraturePoints_2, sizeof(__pyx_k_nElementBoundaryQuadraturePoints_2), 0, 0, 1, 1},
28711  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
28712  {&__pyx_n_s_nElements_owned, __pyx_k_nElements_owned, sizeof(__pyx_k_nElements_owned), 0, 0, 1, 1},
28713  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
28714  {&__pyx_n_s_nFreeDOF_global, __pyx_k_nFreeDOF_global, sizeof(__pyx_k_nFreeDOF_global), 0, 0, 1, 1},
28715  {&__pyx_n_s_nFreeVDOF_global, __pyx_k_nFreeVDOF_global, sizeof(__pyx_k_nFreeVDOF_global), 0, 0, 1, 1},
28716  {&__pyx_n_s_nI, __pyx_k_nI, sizeof(__pyx_k_nI), 0, 0, 1, 1},
28717  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
28718  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
28719  {&__pyx_n_s_nNodes_internal, __pyx_k_nNodes_internal, sizeof(__pyx_k_nNodes_internal), 0, 0, 1, 1},
28720  {&__pyx_n_s_nNonzerosInJacobian, __pyx_k_nNonzerosInJacobian, sizeof(__pyx_k_nNonzerosInJacobian), 0, 0, 1, 1},
28721  {&__pyx_n_s_nQuadraturePoints, __pyx_k_nQuadraturePoints, sizeof(__pyx_k_nQuadraturePoints), 0, 0, 1, 1},
28722  {&__pyx_n_s_nQuadraturePoints_element, __pyx_k_nQuadraturePoints_element, sizeof(__pyx_k_nQuadraturePoints_element), 0, 0, 1, 1},
28723  {&__pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_k_nQuadraturePoints_elementBoundar, sizeof(__pyx_k_nQuadraturePoints_elementBoundar), 0, 0, 1, 1},
28724  {&__pyx_n_s_nQuadraturePoints_elementIn, __pyx_k_nQuadraturePoints_elementIn, sizeof(__pyx_k_nQuadraturePoints_elementIn), 0, 0, 1, 1},
28725  {&__pyx_n_s_nQuadraturePoints_global, __pyx_k_nQuadraturePoints_global, sizeof(__pyx_k_nQuadraturePoints_global), 0, 0, 1, 1},
28726  {&__pyx_n_s_nSpaceIn, __pyx_k_nSpaceIn, sizeof(__pyx_k_nSpaceIn), 0, 0, 1, 1},
28727  {&__pyx_n_s_nSpace_global, __pyx_k_nSpace_global, sizeof(__pyx_k_nSpace_global), 0, 0, 1, 1},
28728  {&__pyx_n_s_nSteps, __pyx_k_nSteps, sizeof(__pyx_k_nSteps), 0, 0, 1, 1},
28729  {&__pyx_n_s_nStepsToDelay, __pyx_k_nStepsToDelay, sizeof(__pyx_k_nStepsToDelay), 0, 0, 1, 1},
28730  {&__pyx_n_s_nVDOF_element, __pyx_k_nVDOF_element, sizeof(__pyx_k_nVDOF_element), 0, 0, 1, 1},
28731  {&__pyx_n_s_n_phi_ip_element, __pyx_k_n_phi_ip_element, sizeof(__pyx_k_n_phi_ip_element), 0, 0, 1, 1},
28732  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
28733  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
28734  {&__pyx_n_s_nc, __pyx_k_nc, sizeof(__pyx_k_nc), 0, 0, 1, 1},
28735  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
28736  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
28737  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
28738  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
28739  {&__pyx_n_s_nodeVelocityArray, __pyx_k_nodeVelocityArray, sizeof(__pyx_k_nodeVelocityArray), 0, 0, 1, 1},
28740  {&__pyx_n_s_nonlinear, __pyx_k_nonlinear, sizeof(__pyx_k_nonlinear), 0, 0, 1, 1},
28741  {&__pyx_n_s_nonlinear_function_evaluations, __pyx_k_nonlinear_function_evaluations, sizeof(__pyx_k_nonlinear_function_evaluations), 0, 0, 1, 1},
28742  {&__pyx_n_s_nonlinear_function_jacobian_eval, __pyx_k_nonlinear_function_jacobian_eval, sizeof(__pyx_k_nonlinear_function_jacobian_eval), 0, 0, 1, 1},
28743  {&__pyx_n_s_normal_ref, __pyx_k_normal_ref, sizeof(__pyx_k_normal_ref), 0, 0, 1, 1},
28744  {&__pyx_n_s_numDiff, __pyx_k_numDiff, sizeof(__pyx_k_numDiff), 0, 0, 1, 1},
28745  {&__pyx_n_s_numDiff_last, __pyx_k_numDiff_last, sizeof(__pyx_k_numDiff_last), 0, 0, 1, 1},
28746  {&__pyx_n_s_numericalFlux, __pyx_k_numericalFlux, sizeof(__pyx_k_numericalFlux), 0, 0, 1, 1},
28747  {&__pyx_n_s_numericalFluxType, __pyx_k_numericalFluxType, sizeof(__pyx_k_numericalFluxType), 0, 0, 1, 1},
28748  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
28749  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
28750  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
28751  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
28752  {&__pyx_n_s_offset_u, __pyx_k_offset_u, sizeof(__pyx_k_offset_u), 0, 0, 1, 1},
28753  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
28754  {&__pyx_n_s_outFlow, __pyx_k_outFlow, sizeof(__pyx_k_outFlow), 0, 0, 1, 1},
28755  {&__pyx_n_s_pdb, __pyx_k_pdb, sizeof(__pyx_k_pdb), 0, 0, 1, 1},
28756  {&__pyx_n_s_penalty, __pyx_k_penalty, sizeof(__pyx_k_penalty), 0, 0, 1, 1},
28757  {&__pyx_n_s_penalty_constant, __pyx_k_penalty_constant, sizeof(__pyx_k_penalty_constant), 0, 0, 1, 1},
28758  {&__pyx_n_s_penalty_power, __pyx_k_penalty_power, sizeof(__pyx_k_penalty_power), 0, 0, 1, 1},
28759  {&__pyx_n_s_periodicDirichletConditions, __pyx_k_periodicDirichletConditions, sizeof(__pyx_k_periodicDirichletConditions), 0, 0, 1, 1},
28760  {&__pyx_n_s_phi, __pyx_k_phi, sizeof(__pyx_k_phi), 0, 0, 1, 1},
28761  {&__pyx_n_s_phiDict, __pyx_k_phiDict, sizeof(__pyx_k_phiDict), 0, 0, 1, 1},
28762  {&__pyx_n_s_phiTrialIsTrial, __pyx_k_phiTrialIsTrial, sizeof(__pyx_k_phiTrialIsTrial), 0, 0, 1, 1},
28763  {&__pyx_n_s_phi_ip, __pyx_k_phi_ip, sizeof(__pyx_k_phi_ip), 0, 0, 1, 1},
28764  {&__pyx_n_s_phi_k, __pyx_k_phi_k, sizeof(__pyx_k_phi_k), 0, 0, 1, 1},
28765  {&__pyx_n_s_points_elementBoundaryQuadrature, __pyx_k_points_elementBoundaryQuadrature, sizeof(__pyx_k_points_elementBoundaryQuadrature), 0, 0, 1, 1},
28766  {&__pyx_n_s_potential, __pyx_k_potential, sizeof(__pyx_k_potential), 0, 0, 1, 1},
28767  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
28768  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
28769  {&__pyx_n_s_proteus_FemTools, __pyx_k_proteus_FemTools, sizeof(__pyx_k_proteus_FemTools), 0, 0, 1, 1},
28770  {&__pyx_n_s_proteus_NonlinearSolvers, __pyx_k_proteus_NonlinearSolvers, sizeof(__pyx_k_proteus_NonlinearSolvers), 0, 0, 1, 1},
28771  {&__pyx_n_s_proteus_Profiling, __pyx_k_proteus_Profiling, sizeof(__pyx_k_proteus_Profiling), 0, 0, 1, 1},
28772  {&__pyx_n_s_proteus_ShockCapturing, __pyx_k_proteus_ShockCapturing, sizeof(__pyx_k_proteus_ShockCapturing), 0, 0, 1, 1},
28773  {&__pyx_n_s_proteus_SubgridError, __pyx_k_proteus_SubgridError, sizeof(__pyx_k_proteus_SubgridError), 0, 0, 1, 1},
28774  {&__pyx_n_s_proteus_Transport, __pyx_k_proteus_Transport, sizeof(__pyx_k_proteus_Transport), 0, 0, 1, 1},
28775  {&__pyx_n_s_proteus_TransportCoefficients, __pyx_k_proteus_TransportCoefficients, sizeof(__pyx_k_proteus_TransportCoefficients), 0, 0, 1, 1},
28776  {&__pyx_n_s_proteus_ctransportCoefficients, __pyx_k_proteus_ctransportCoefficients, sizeof(__pyx_k_proteus_ctransportCoefficients), 0, 0, 1, 1},
28777  {&__pyx_n_s_proteus_flcbdfWrappers, __pyx_k_proteus_flcbdfWrappers, sizeof(__pyx_k_proteus_flcbdfWrappers), 0, 0, 1, 1},
28778  {&__pyx_n_s_psi, __pyx_k_psi, sizeof(__pyx_k_psi), 0, 0, 1, 1},
28779  {&__pyx_n_s_psi_trace, __pyx_k_psi_trace, sizeof(__pyx_k_psi_trace), 0, 0, 1, 1},
28780  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
28781  {&__pyx_n_s_q_a, __pyx_k_q_a, sizeof(__pyx_k_q_a), 0, 0, 1, 1},
28782  {&__pyx_n_s_q_numDiff_u, __pyx_k_q_numDiff_u, sizeof(__pyx_k_q_numDiff_u), 0, 0, 1, 1},
28783  {&__pyx_n_s_q_numDiff_u_last, __pyx_k_q_numDiff_u_last, sizeof(__pyx_k_q_numDiff_u_last), 0, 0, 1, 1},
28784  {&__pyx_n_s_q_r, __pyx_k_q_r, sizeof(__pyx_k_q_r), 0, 0, 1, 1},
28785  {&__pyx_n_s_q_v, __pyx_k_q_v, sizeof(__pyx_k_q_v), 0, 0, 1, 1},
28786  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
28787  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
28788  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
28789  {&__pyx_n_s_reaction, __pyx_k_reaction, sizeof(__pyx_k_reaction), 0, 0, 1, 1},
28790  {&__pyx_n_s_reactionLumping, __pyx_k_reactionLumping, sizeof(__pyx_k_reactionLumping), 0, 0, 1, 1},
28791  {&__pyx_n_s_referenceFiniteElement, __pyx_k_referenceFiniteElement, sizeof(__pyx_k_referenceFiniteElement), 0, 0, 1, 1},
28792  {&__pyx_n_s_reuse_test_trial_quadrature, __pyx_k_reuse_test_trial_quadrature, sizeof(__pyx_k_reuse_test_trial_quadrature), 0, 0, 1, 1},
28793  {&__pyx_n_s_reuse_trial_and_test_quadrature, __pyx_k_reuse_trial_and_test_quadrature, sizeof(__pyx_k_reuse_trial_and_test_quadrature), 0, 0, 1, 1},
28794  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
28795  {&__pyx_n_s_sc_alpha, __pyx_k_sc_alpha, sizeof(__pyx_k_sc_alpha), 0, 0, 1, 1},
28796  {&__pyx_n_s_sc_beta, __pyx_k_sc_beta, sizeof(__pyx_k_sc_beta), 0, 0, 1, 1},
28797  {&__pyx_n_s_sc_uref, __pyx_k_sc_uref, sizeof(__pyx_k_sc_uref), 0, 0, 1, 1},
28798  {&__pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_k_scalars_elementBoundaryQuadratur, sizeof(__pyx_k_scalars_elementBoundaryQuadratur), 0, 0, 1, 1},
28799  {&__pyx_n_s_sd, __pyx_k_sd, sizeof(__pyx_k_sd), 0, 0, 1, 1},
28800  {&__pyx_n_s_sdInfo, __pyx_k_sdInfo, sizeof(__pyx_k_sdInfo), 0, 0, 1, 1},
28801  {&__pyx_n_s_sdInfo_u_u_colind, __pyx_k_sdInfo_u_u_colind, sizeof(__pyx_k_sdInfo_u_u_colind), 0, 0, 1, 1},
28802  {&__pyx_n_s_sdInfo_u_u_rowptr, __pyx_k_sdInfo_u_u_rowptr, sizeof(__pyx_k_sdInfo_u_u_rowptr), 0, 0, 1, 1},
28803  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
28804  {&__pyx_n_s_setDirichletValues, __pyx_k_setDirichletValues, sizeof(__pyx_k_setDirichletValues), 0, 0, 1, 1},
28805  {&__pyx_n_s_setFlow, __pyx_k_setFlow, sizeof(__pyx_k_setFlow), 0, 0, 1, 1},
28806  {&__pyx_n_s_setFromOptions, __pyx_k_setFromOptions, sizeof(__pyx_k_setFromOptions), 0, 0, 1, 1},
28807  {&__pyx_n_s_setUnknowns, __pyx_k_setUnknowns, sizeof(__pyx_k_setUnknowns), 0, 0, 1, 1},
28808  {&__pyx_n_s_setupFieldStrides, __pyx_k_setupFieldStrides, sizeof(__pyx_k_setupFieldStrides), 0, 0, 1, 1},
28809  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
28810  {&__pyx_n_s_shockCapturing, __pyx_k_shockCapturing, sizeof(__pyx_k_shockCapturing), 0, 0, 1, 1},
28811  {&__pyx_n_s_shockCapturingDiffusion, __pyx_k_shockCapturingDiffusion, sizeof(__pyx_k_shockCapturingDiffusion), 0, 0, 1, 1},
28812  {&__pyx_n_s_shockCapturingFactor, __pyx_k_shockCapturingFactor, sizeof(__pyx_k_shockCapturingFactor), 0, 0, 1, 1},
28813  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
28814  {&__pyx_n_s_sparseDiffusionTensors, __pyx_k_sparseDiffusionTensors, sizeof(__pyx_k_sparseDiffusionTensors), 0, 0, 1, 1},
28815  {&__pyx_n_s_stab, __pyx_k_stab, sizeof(__pyx_k_stab), 0, 0, 1, 1},
28816  {&__pyx_n_s_stabilization, __pyx_k_stabilization, sizeof(__pyx_k_stabilization), 0, 0, 1, 1},
28817  {&__pyx_n_s_stabilizationIsNonlinear, __pyx_k_stabilizationIsNonlinear, sizeof(__pyx_k_stabilizationIsNonlinear), 0, 0, 1, 1},
28818  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
28819  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
28820  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
28821  {&__pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_k_stressTraceBoundaryConditionsSet, sizeof(__pyx_k_stressTraceBoundaryConditionsSet), 0, 0, 1, 1},
28822  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
28823  {&__pyx_kp_s_stride_offset, __pyx_k_stride_offset, sizeof(__pyx_k_stride_offset), 0, 0, 1, 0},
28824  {&__pyx_n_s_stride_u, __pyx_k_stride_u, sizeof(__pyx_k_stride_u), 0, 0, 1, 1},
28825  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
28826  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
28827  {&__pyx_n_s_tLast_mesh, __pyx_k_tLast_mesh, sizeof(__pyx_k_tLast_mesh), 0, 0, 1, 1},
28828  {&__pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_k_tensors_elementBoundaryQuadratur, sizeof(__pyx_k_tensors_elementBoundaryQuadratur), 0, 0, 1, 1},
28829  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
28830  {&__pyx_n_s_testIsTrial, __pyx_k_testIsTrial, sizeof(__pyx_k_testIsTrial), 0, 0, 1, 1},
28831  {&__pyx_n_s_testSpace, __pyx_k_testSpace, sizeof(__pyx_k_testSpace), 0, 0, 1, 1},
28832  {&__pyx_n_s_testSpaceDict, __pyx_k_testSpaceDict, sizeof(__pyx_k_testSpaceDict), 0, 0, 1, 1},
28833  {&__pyx_n_s_timeIntegration, __pyx_k_timeIntegration, sizeof(__pyx_k_timeIntegration), 0, 0, 1, 1},
28834  {&__pyx_n_s_timeTerm, __pyx_k_timeTerm, sizeof(__pyx_k_timeTerm), 0, 0, 1, 1},
28835  {&__pyx_n_s_timeVaryingCoefficients, __pyx_k_timeVaryingCoefficients, sizeof(__pyx_k_timeVaryingCoefficients), 0, 0, 1, 1},
28836  {&__pyx_kp_s_to_reuse_test_trial_quad_all_fem, __pyx_k_to_reuse_test_trial_quad_all_fem, sizeof(__pyx_k_to_reuse_test_trial_quad_all_fem), 0, 0, 1, 0},
28837  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
28838  {&__pyx_n_s_uDict, __pyx_k_uDict, sizeof(__pyx_k_uDict), 0, 0, 1, 1},
28839  {&__pyx_n_s_u_dof, __pyx_k_u_dof, sizeof(__pyx_k_u_dof), 0, 0, 1, 1},
28840  {&__pyx_n_s_u_grad_test_ref, __pyx_k_u_grad_test_ref, sizeof(__pyx_k_u_grad_test_ref), 0, 0, 1, 1},
28841  {&__pyx_n_s_u_grad_test_trace_ref, __pyx_k_u_grad_test_trace_ref, sizeof(__pyx_k_u_grad_test_trace_ref), 0, 0, 1, 1},
28842  {&__pyx_n_s_u_grad_trial_ref, __pyx_k_u_grad_trial_ref, sizeof(__pyx_k_u_grad_trial_ref), 0, 0, 1, 1},
28843  {&__pyx_n_s_u_grad_trial_trace_ref, __pyx_k_u_grad_trial_trace_ref, sizeof(__pyx_k_u_grad_trial_trace_ref), 0, 0, 1, 1},
28844  {&__pyx_n_s_u_j, __pyx_k_u_j, sizeof(__pyx_k_u_j), 0, 0, 1, 1},
28845  {&__pyx_n_s_u_l2g, __pyx_k_u_l2g, sizeof(__pyx_k_u_l2g), 0, 0, 1, 1},
28846  {&__pyx_n_s_u_test_ref, __pyx_k_u_test_ref, sizeof(__pyx_k_u_test_ref), 0, 0, 1, 1},
28847  {&__pyx_n_s_u_test_trace_ref, __pyx_k_u_test_trace_ref, sizeof(__pyx_k_u_test_trace_ref), 0, 0, 1, 1},
28848  {&__pyx_n_s_u_trial_ref, __pyx_k_u_trial_ref, sizeof(__pyx_k_u_trial_ref), 0, 0, 1, 1},
28849  {&__pyx_n_s_u_trial_trace_ref, __pyx_k_u_trial_trace_ref, sizeof(__pyx_k_u_trial_trace_ref), 0, 0, 1, 1},
28850  {&__pyx_n_s_ua, __pyx_k_ua, sizeof(__pyx_k_ua), 0, 0, 1, 1},
28851  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
28852  {&__pyx_n_s_updateLocal2Global, __pyx_k_updateLocal2Global, sizeof(__pyx_k_updateLocal2Global), 0, 0, 1, 1},
28853  {&__pyx_n_s_updateShockCapturingHistory, __pyx_k_updateShockCapturingHistory, sizeof(__pyx_k_updateShockCapturingHistory), 0, 0, 1, 1},
28854  {&__pyx_n_s_updateSubgridErrorHistory, __pyx_k_updateSubgridErrorHistory, sizeof(__pyx_k_updateSubgridErrorHistory), 0, 0, 1, 1},
28855  {&__pyx_n_s_useMetrics, __pyx_k_useMetrics, sizeof(__pyx_k_useMetrics), 0, 0, 1, 1},
28856  {&__pyx_n_s_useSparseDiffusion, __pyx_k_useSparseDiffusion, sizeof(__pyx_k_useSparseDiffusion), 0, 0, 1, 1},
28857  {&__pyx_n_s_useWeakDirichletConditions, __pyx_k_useWeakDirichletConditions, sizeof(__pyx_k_useWeakDirichletConditions), 0, 0, 1, 1},
28858  {&__pyx_n_s_usesGradientStabilization, __pyx_k_usesGradientStabilization, sizeof(__pyx_k_usesGradientStabilization), 0, 0, 1, 1},
28859  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
28860  {&__pyx_n_s_variableNames, __pyx_k_variableNames, sizeof(__pyx_k_variableNames), 0, 0, 1, 1},
28861  {&__pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_k_vectors_elementBoundaryQuadratur, sizeof(__pyx_k_vectors_elementBoundaryQuadratur), 0, 0, 1, 1},
28862  {&__pyx_n_s_velocity, __pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 0, 1, 1},
28863  {&__pyx_n_s_velocityPostProcessor, __pyx_k_velocityPostProcessor, sizeof(__pyx_k_velocityPostProcessor), 0, 0, 1, 1},
28864  {&__pyx_kp_s_velocity_postprocessor, __pyx_k_velocity_postprocessor, sizeof(__pyx_k_velocity_postprocessor), 0, 0, 1, 0},
28865  {&__pyx_n_s_vt, __pyx_k_vt, sizeof(__pyx_k_vt), 0, 0, 1, 1},
28866  {&__pyx_n_s_weakDirichletConditions, __pyx_k_weakDirichletConditions, sizeof(__pyx_k_weakDirichletConditions), 0, 0, 1, 1},
28867  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
28868  {&__pyx_n_s_zeroJacobian_CSR, __pyx_k_zeroJacobian_CSR, sizeof(__pyx_k_zeroJacobian_CSR), 0, 0, 1, 1},
28869  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
28870  {0, 0, 0, 0, 0, 0, 0}
28871 };
28872 static int __Pyx_InitCachedBuiltins(void) {
28873  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 422, __pyx_L1_error)
28874  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 683, __pyx_L1_error)
28875  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 831, __pyx_L1_error)
28876  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 218, __pyx_L1_error)
28877  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 799, __pyx_L1_error)
28878  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 989, __pyx_L1_error)
28879  return 0;
28880  __pyx_L1_error:;
28881  return -1;
28882 }
28883 
28884 static int __Pyx_InitCachedConstants(void) {
28885  __Pyx_RefNannyDeclarations
28886  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
28887 
28888  /* "ADR.pyx":415
28889  * self.nSteps=0
28890  * if self.lag:
28891  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying") # <<<<<<<<<<<<<<
28892  * self.nStepsToDelay=1
28893  * self.lag=False
28894  */
28895  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_ADR_ShockCapturing_lagging_reque); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 415, __pyx_L1_error)
28896  __Pyx_GOTREF(__pyx_tuple_);
28897  __Pyx_GIVEREF(__pyx_tuple_);
28898 
28899  /* "ADR.pyx":429
28900  * if self.lag:
28901  * for ci in range(self.nc):
28902  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
28903  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
28904  * log("ADR.ShockCapturing: switched to lagged shock capturing")
28905  */
28906  __pyx_slice__2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 429, __pyx_L1_error)
28907  __Pyx_GOTREF(__pyx_slice__2);
28908  __Pyx_GIVEREF(__pyx_slice__2);
28909 
28910  /* "ADR.pyx":431
28911  * self.numDiff_last[ci][:] = self.numDiff[ci]
28912  * if self.lag == False and self.nStepsToDelay != None and self.nSteps > self.nStepsToDelay:
28913  * log("ADR.ShockCapturing: switched to lagged shock capturing") # <<<<<<<<<<<<<<
28914  * self.lag = True
28915  * self.numDiff_last=[]
28916  */
28917  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_ADR_ShockCapturing_switched_to_l); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 431, __pyx_L1_error)
28918  __Pyx_GOTREF(__pyx_tuple__3);
28919  __Pyx_GIVEREF(__pyx_tuple__3);
28920 
28921  /* "ADR.pyx":500
28922  * potential[i] = {i : 'u'}
28923  * #end i
28924  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
28925  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
28926  * TC_base.__init__(self,
28927  */
28928  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 500, __pyx_L1_error)
28929  __Pyx_GOTREF(__pyx_tuple__4);
28930  __Pyx_GIVEREF(__pyx_tuple__4);
28931 
28932  /* "ADR.pyx":519
28933  * if cq.has_key(('df',ci,ci)):
28934  * if self.velocity != None:
28935  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28936  * else:
28937  * cq[('df',ci,ci)].flat[:] = 0.0
28938  */
28939  __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 519, __pyx_L1_error)
28940  __Pyx_GOTREF(__pyx_slice__5);
28941  __Pyx_GIVEREF(__pyx_slice__5);
28942  __pyx_tuple__6 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 519, __pyx_L1_error)
28943  __Pyx_GOTREF(__pyx_tuple__6);
28944  __Pyx_GIVEREF(__pyx_tuple__6);
28945 
28946  /* "ADR.pyx":521
28947  * cq[('df',ci,ci)][...,:] = self.velocity
28948  * else:
28949  * cq[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
28950  * for i in range(len(cq[('r',ci)].flat)):
28951  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
28952  */
28953  __pyx_slice__7 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 521, __pyx_L1_error)
28954  __Pyx_GOTREF(__pyx_slice__7);
28955  __Pyx_GIVEREF(__pyx_slice__7);
28956 
28957  /* "ADR.pyx":531
28958  * if c.has_key(('df',ci,ci)):
28959  * if self.velocity != None:
28960  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28961  * else:
28962  * c[('df',ci,ci)].flat[:] = 0.0
28963  */
28964  __pyx_slice__8 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 531, __pyx_L1_error)
28965  __Pyx_GOTREF(__pyx_slice__8);
28966  __Pyx_GIVEREF(__pyx_slice__8);
28967  __pyx_tuple__9 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__8); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 531, __pyx_L1_error)
28968  __Pyx_GOTREF(__pyx_tuple__9);
28969  __Pyx_GIVEREF(__pyx_tuple__9);
28970 
28971  /* "ADR.pyx":533
28972  * c[('df',ci,ci)][...,:] = self.velocity
28973  * else:
28974  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
28975  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
28976  * for i in range(len(c[('u',ci)].flat)):
28977  */
28978  __pyx_slice__10 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 533, __pyx_L1_error)
28979  __Pyx_GOTREF(__pyx_slice__10);
28980  __Pyx_GIVEREF(__pyx_slice__10);
28981 
28982  /* "ADR.pyx":544
28983  * if c.has_key(('df',ci,ci)):
28984  * if self.velocity != None:
28985  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28986  * else:
28987  * c[('df',ci,ci)].flat[:] = 0.0
28988  */
28989  __pyx_slice__11 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 544, __pyx_L1_error)
28990  __Pyx_GOTREF(__pyx_slice__11);
28991  __Pyx_GIVEREF(__pyx_slice__11);
28992  __pyx_tuple__12 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__11); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 544, __pyx_L1_error)
28993  __Pyx_GOTREF(__pyx_tuple__12);
28994  __Pyx_GIVEREF(__pyx_tuple__12);
28995 
28996  /* "ADR.pyx":546
28997  * c[('df',ci,ci)][...,:] = self.velocity
28998  * else:
28999  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
29000  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
29001  * for i in range(len(c[('u',ci)].flat)):
29002  */
29003  __pyx_slice__13 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 546, __pyx_L1_error)
29004  __Pyx_GOTREF(__pyx_slice__13);
29005  __Pyx_GIVEREF(__pyx_slice__13);
29006 
29007  /* "ADR.pyx":556
29008  * for ci in range(self.nc):
29009  * if self.velocity != None:
29010  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
29011  * else:
29012  * c[('df',ci,ci)].flat[:] = 0.0
29013  */
29014  __pyx_slice__14 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 556, __pyx_L1_error)
29015  __Pyx_GOTREF(__pyx_slice__14);
29016  __Pyx_GIVEREF(__pyx_slice__14);
29017  __pyx_tuple__15 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__14); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 556, __pyx_L1_error)
29018  __Pyx_GOTREF(__pyx_tuple__15);
29019  __Pyx_GIVEREF(__pyx_tuple__15);
29020 
29021  /* "ADR.pyx":558
29022  * c[('df',ci,ci)][...,:] = self.velocity
29023  * else:
29024  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
29025  * for i in range(len(c[('r',ci)].flat)):
29026  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
29027  */
29028  __pyx_slice__16 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 558, __pyx_L1_error)
29029  __Pyx_GOTREF(__pyx_slice__16);
29030  __Pyx_GIVEREF(__pyx_slice__16);
29031 
29032  /* "ADR.pyx":707
29033  * if elemQuadIsDict:
29034  * if elementQuadrature.has_key(I):
29035  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
29036  * else:
29037  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
29038  */
29039  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 707, __pyx_L1_error)
29040  __Pyx_GOTREF(__pyx_tuple__17);
29041  __Pyx_GIVEREF(__pyx_tuple__17);
29042  __pyx_slice__18 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 707, __pyx_L1_error)
29043  __Pyx_GOTREF(__pyx_slice__18);
29044  __Pyx_GIVEREF(__pyx_slice__18);
29045 
29046  /* "ADR.pyx":709
29047  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
29048  * else:
29049  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default'] # <<<<<<<<<<<<<<
29050  * else:
29051  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
29052  */
29053  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 709, __pyx_L1_error)
29054  __Pyx_GOTREF(__pyx_tuple__19);
29055  __Pyx_GIVEREF(__pyx_tuple__19);
29056  __pyx_slice__20 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 709, __pyx_L1_error)
29057  __Pyx_GOTREF(__pyx_slice__20);
29058  __Pyx_GIVEREF(__pyx_slice__20);
29059 
29060  /* "ADR.pyx":711
29061  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
29062  * else:
29063  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature # <<<<<<<<<<<<<<
29064  * if self.shockCapturing != None:
29065  * for ci in self.shockCapturing.components:
29066  */
29067  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 711, __pyx_L1_error)
29068  __Pyx_GOTREF(__pyx_tuple__21);
29069  __Pyx_GIVEREF(__pyx_tuple__21);
29070  __pyx_slice__22 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__22)) __PYX_ERR(0, 711, __pyx_L1_error)
29071  __Pyx_GOTREF(__pyx_slice__22);
29072  __Pyx_GIVEREF(__pyx_slice__22);
29073 
29074  /* "ADR.pyx":725
29075  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
29076  * for I in self.coefficients.elementIntegralKeys:
29077  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
29078  * if reactionLumping:
29079  * for ci in self.coefficients.mass.keys():
29080  */
29081  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 725, __pyx_L1_error)
29082  __Pyx_GOTREF(__pyx_tuple__23);
29083  __Pyx_GIVEREF(__pyx_tuple__23);
29084  __pyx_slice__24 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 725, __pyx_L1_error)
29085  __Pyx_GOTREF(__pyx_slice__24);
29086  __Pyx_GIVEREF(__pyx_slice__24);
29087 
29088  /* "ADR.pyx":730
29089  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
29090  * for I in self.coefficients.elementIntegralKeys:
29091  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
29092  * elementBoundaryQuadratureDict={}
29093  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
29094  */
29095  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 730, __pyx_L1_error)
29096  __Pyx_GOTREF(__pyx_tuple__25);
29097  __Pyx_GIVEREF(__pyx_tuple__25);
29098  __pyx_slice__26 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 730, __pyx_L1_error)
29099  __Pyx_GOTREF(__pyx_slice__26);
29100  __Pyx_GIVEREF(__pyx_slice__26);
29101 
29102  /* "ADR.pyx":787
29103  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
29104  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
29105  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29106  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29107  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29108  */
29109  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 787, __pyx_L1_error)
29110  __Pyx_GOTREF(__pyx_tuple__27);
29111  __Pyx_GIVEREF(__pyx_tuple__27);
29112 
29113  /* "ADR.pyx":788
29114  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
29115  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29116  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29117  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29118  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29119  */
29120  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_kp_s_grad_u, __pyx_int_0); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 788, __pyx_L1_error)
29121  __Pyx_GOTREF(__pyx_tuple__28);
29122  __Pyx_GIVEREF(__pyx_tuple__28);
29123 
29124  /* "ADR.pyx":789
29125  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29126  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29127  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
29128  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29129  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29130  */
29131  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 789, __pyx_L1_error)
29132  __Pyx_GOTREF(__pyx_tuple__29);
29133  __Pyx_GIVEREF(__pyx_tuple__29);
29134  __pyx_tuple__30 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 789, __pyx_L1_error)
29135  __Pyx_GOTREF(__pyx_tuple__30);
29136  __Pyx_GIVEREF(__pyx_tuple__30);
29137 
29138  /* "ADR.pyx":790
29139  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29140  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29141  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29142  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29143  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29144  */
29145  __pyx_tuple__31 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 790, __pyx_L1_error)
29146  __Pyx_GOTREF(__pyx_tuple__31);
29147  __Pyx_GIVEREF(__pyx_tuple__31);
29148 
29149  /* "ADR.pyx":791
29150  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29151  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29152  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29153  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29154  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29155  */
29156  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 791, __pyx_L1_error)
29157  __Pyx_GOTREF(__pyx_tuple__32);
29158  __Pyx_GIVEREF(__pyx_tuple__32);
29159 
29160  /* "ADR.pyx":792
29161  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
29162  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29163  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29164  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29165  *
29166  */
29167  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 792, __pyx_L1_error)
29168  __Pyx_GOTREF(__pyx_tuple__33);
29169  __Pyx_GIVEREF(__pyx_tuple__33);
29170 
29171  /* "ADR.pyx":793
29172  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29173  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
29174  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
29175  *
29176  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29177  */
29178  __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_numDiff, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 793, __pyx_L1_error)
29179  __Pyx_GOTREF(__pyx_tuple__34);
29180  __Pyx_GIVEREF(__pyx_tuple__34);
29181 
29182  /* "ADR.pyx":796
29183  *
29184  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29185  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29186  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29187  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29188  */
29189  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 796, __pyx_L1_error)
29190  __Pyx_GOTREF(__pyx_tuple__35);
29191  __Pyx_GIVEREF(__pyx_tuple__35);
29192 
29193  /* "ADR.pyx":797
29194  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29195  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29196  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
29197  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29198  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29199  */
29200  __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 797, __pyx_L1_error)
29201  __Pyx_GOTREF(__pyx_tuple__36);
29202  __Pyx_GIVEREF(__pyx_tuple__36);
29203 
29204  /* "ADR.pyx":798
29205  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29206  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29207  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29208  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29209  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29210  */
29211  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 798, __pyx_L1_error)
29212  __Pyx_GOTREF(__pyx_tuple__37);
29213  __Pyx_GIVEREF(__pyx_tuple__37);
29214 
29215  /* "ADR.pyx":799
29216  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29217  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29218  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
29219  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29220  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29221  */
29222  __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 799, __pyx_L1_error)
29223  __Pyx_GOTREF(__pyx_tuple__38);
29224  __Pyx_GIVEREF(__pyx_tuple__38);
29225 
29226  /* "ADR.pyx":800
29227  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29228  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29229  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29230  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29231  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29232  */
29233  __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 800, __pyx_L1_error)
29234  __Pyx_GOTREF(__pyx_tuple__39);
29235  __Pyx_GIVEREF(__pyx_tuple__39);
29236 
29237  /* "ADR.pyx":801
29238  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
29239  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29240  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29241  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29242  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29243  */
29244  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_s_grad_u, __pyx_int_0); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 801, __pyx_L1_error)
29245  __Pyx_GOTREF(__pyx_tuple__40);
29246  __Pyx_GIVEREF(__pyx_tuple__40);
29247 
29248  /* "ADR.pyx":802
29249  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29250  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29251  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
29252  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29253  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29254  */
29255  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 802, __pyx_L1_error)
29256  __Pyx_GOTREF(__pyx_tuple__41);
29257  __Pyx_GIVEREF(__pyx_tuple__41);
29258  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 802, __pyx_L1_error)
29259  __Pyx_GOTREF(__pyx_tuple__42);
29260  __Pyx_GIVEREF(__pyx_tuple__42);
29261 
29262  /* "ADR.pyx":803
29263  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29264  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29265  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
29266  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
29267  *
29268  */
29269  __pyx_tuple__43 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 803, __pyx_L1_error)
29270  __Pyx_GOTREF(__pyx_tuple__43);
29271  __Pyx_GIVEREF(__pyx_tuple__43);
29272 
29273  /* "ADR.pyx":804
29274  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
29275  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
29276  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
29277  *
29278  * self.points_elementBoundaryQuadrature= set()
29279  */
29280  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 804, __pyx_L1_error)
29281  __Pyx_GOTREF(__pyx_tuple__44);
29282  __Pyx_GIVEREF(__pyx_tuple__44);
29283 
29284  /* "ADR.pyx":810
29285  * self.vectors_elementBoundaryQuadrature= set()
29286  * self.tensors_elementBoundaryQuadrature= set()
29287  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29288  * self.inflowBoundaryBC = {}
29289  * self.inflowBoundaryBC_values = {}
29290  */
29291  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_kp_s_element_and_element_boundary_Jac, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 810, __pyx_L1_error)
29292  __Pyx_GOTREF(__pyx_tuple__45);
29293  __Pyx_GIVEREF(__pyx_tuple__45);
29294 
29295  /* "ADR.pyx":836
29296  * del self.internalNodes
29297  * self.internalNodes = None
29298  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
29299  * self.updateLocal2Global()
29300  * log("Building time integration object",2)
29301  */
29302  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_kp_s_Updating_local_to_global_mapping, __pyx_int_2); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 836, __pyx_L1_error)
29303  __Pyx_GOTREF(__pyx_tuple__46);
29304  __Pyx_GIVEREF(__pyx_tuple__46);
29305 
29306  /* "ADR.pyx":838
29307  * log("Updating local to global mappings",2)
29308  * self.updateLocal2Global()
29309  * log("Building time integration object",2) # <<<<<<<<<<<<<<
29310  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
29311  * #mwf for interpolating subgrid error for gradients etc
29312  */
29313  __pyx_tuple__47 = PyTuple_Pack(2, __pyx_kp_s_Building_time_integration_object, __pyx_int_2); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 838, __pyx_L1_error)
29314  __Pyx_GOTREF(__pyx_tuple__47);
29315  __Pyx_GIVEREF(__pyx_tuple__47);
29316 
29317  /* "ADR.pyx":839
29318  * self.updateLocal2Global()
29319  * log("Building time integration object",2)
29320  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29321  * #mwf for interpolating subgrid error for gradients etc
29322  * if self.stabilization and self.stabilization.usesGradientStabilization:
29323  */
29324  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 839, __pyx_L1_error)
29325  __Pyx_GOTREF(__pyx_tuple__48);
29326  __Pyx_GIVEREF(__pyx_tuple__48);
29327 
29328  /* "ADR.pyx":848
29329  * if options != None:
29330  * self.timeIntegration.setFromOptions(options)
29331  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29332  * log("Calculating numerical quadrature formulas",2)
29333  * self.calculateQuadrature()
29334  */
29335  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_TimeIntegration, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 848, __pyx_L1_error)
29336  __Pyx_GOTREF(__pyx_tuple__49);
29337  __Pyx_GIVEREF(__pyx_tuple__49);
29338 
29339  /* "ADR.pyx":849
29340  * self.timeIntegration.setFromOptions(options)
29341  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
29342  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
29343  * self.calculateQuadrature()
29344  *
29345  */
29346  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_kp_s_Calculating_numerical_quadrature, __pyx_int_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 849, __pyx_L1_error)
29347  __Pyx_GOTREF(__pyx_tuple__50);
29348  __Pyx_GIVEREF(__pyx_tuple__50);
29349 
29350  /* "ADR.pyx":859
29351  * self.setupFieldStrides()
29352  *
29353  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29354  * if numericalFluxType != None:
29355  * if options == None or options.periodicDirichletConditions == None:
29356  */
29357  __pyx_tuple__51 = PyTuple_Pack(2, __pyx_kp_s_stride_offset, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 859, __pyx_L1_error)
29358  __Pyx_GOTREF(__pyx_tuple__51);
29359  __Pyx_GIVEREF(__pyx_tuple__51);
29360 
29361  /* "ADR.pyx":876
29362  * #set penalty terms
29363  * #cek todo move into numerical flux initialization
29364  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
29365  * for ebN in range(self.mesh.nElementBoundaries_global):
29366  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
29367  */
29368  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_penalty); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 876, __pyx_L1_error)
29369  __Pyx_GOTREF(__pyx_tuple__52);
29370  __Pyx_GIVEREF(__pyx_tuple__52);
29371 
29372  /* "ADR.pyx":882
29373  * #penalty term
29374  * #cek move to Numerical flux initialization
29375  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
29376  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
29377  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
29378  */
29379  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_penalty); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 882, __pyx_L1_error)
29380  __Pyx_GOTREF(__pyx_tuple__53);
29381  __Pyx_GIVEREF(__pyx_tuple__53);
29382 
29383  /* "ADR.pyx":887
29384  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
29385  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
29386  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29387  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
29388  * #use post processing tools to get conservative fluxes, None by default
29389  */
29390  __pyx_tuple__54 = PyTuple_Pack(2, __pyx_n_s_numericalFlux, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 887, __pyx_L1_error)
29391  __Pyx_GOTREF(__pyx_tuple__54);
29392  __Pyx_GIVEREF(__pyx_tuple__54);
29393 
29394  /* "ADR.pyx":892
29395  * from proteus import PostProcessingTools
29396  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
29397  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
29398  * #helper for writing out data storage
29399  * from proteus import Archiver
29400  */
29401  __pyx_tuple__55 = PyTuple_Pack(2, __pyx_kp_s_velocity_postprocessor, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 892, __pyx_L1_error)
29402  __Pyx_GOTREF(__pyx_tuple__55);
29403  __Pyx_GIVEREF(__pyx_tuple__55);
29404 
29405  /* "ADR.pyx":943
29406  * Calculate the element residuals and add in to the global residual
29407  * """
29408  * r.fill(0.0) # <<<<<<<<<<<<<<
29409  * #Load the unknowns into the finite element dof
29410  * self.setUnknowns(u)
29411  */
29412  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_float_0_0); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 943, __pyx_L1_error)
29413  __Pyx_GOTREF(__pyx_tuple__56);
29414  __Pyx_GIVEREF(__pyx_tuple__56);
29415 
29416  /* "ADR.pyx":954
29417  * self.mesh.nodeArray,
29418  * self.mesh.elementNodesArray,
29419  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29420  * self.u[0].femSpace.psi,
29421  * self.u[0].femSpace.grad_psi,
29422  */
29423  __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 954, __pyx_L1_error)
29424  __Pyx_GOTREF(__pyx_tuple__57);
29425  __Pyx_GIVEREF(__pyx_tuple__57);
29426 
29427  /* "ADR.pyx":960
29428  * self.u[0].femSpace.grad_psi,
29429  * self.mesh.elementDiametersArray,
29430  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
29431  * self.shockCapturing.shockCapturingFactor,
29432  * self.coefficients.sc_uref,
29433  */
29434  __pyx_tuple__58 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 960, __pyx_L1_error)
29435  __Pyx_GOTREF(__pyx_tuple__58);
29436  __Pyx_GIVEREF(__pyx_tuple__58);
29437 
29438  /* "ADR.pyx":968
29439  * self.u[0].femSpace.elementMaps.psi_trace,
29440  * self.u[0].femSpace.elementMaps.grad_psi_trace,
29441  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29442  * self.u[0].femSpace.psi_trace,
29443  * self.u[0].femSpace.grad_psi_trace,
29444  */
29445  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 968, __pyx_L1_error)
29446  __Pyx_GOTREF(__pyx_tuple__59);
29447  __Pyx_GIVEREF(__pyx_tuple__59);
29448 
29449  /* "ADR.pyx":979
29450  * self.u[0].femSpace.dofMap.l2g,
29451  * self.u[0].dof,
29452  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
29453  * self.coefficients.sdInfo[(0,0)][1],
29454  * self.q[('a',0,0)],
29455  */
29456  __pyx_tuple__60 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 979, __pyx_L1_error)
29457  __Pyx_GOTREF(__pyx_tuple__60);
29458  __Pyx_GIVEREF(__pyx_tuple__60);
29459 
29460  /* "ADR.pyx":980
29461  * self.u[0].dof,
29462  * self.coefficients.sdInfo[(0,0)][0],
29463  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
29464  * self.q[('a',0,0)],
29465  * self.q[('df',0,0)],
29466  */
29467  __pyx_tuple__61 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 980, __pyx_L1_error)
29468  __Pyx_GOTREF(__pyx_tuple__61);
29469  __Pyx_GIVEREF(__pyx_tuple__61);
29470 
29471  /* "ADR.pyx":981
29472  * self.coefficients.sdInfo[(0,0)][0],
29473  * self.coefficients.sdInfo[(0,0)][1],
29474  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
29475  * self.q[('df',0,0)],
29476  * self.q[('r',0)],
29477  */
29478  __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 981, __pyx_L1_error)
29479  __Pyx_GOTREF(__pyx_tuple__62);
29480  __Pyx_GIVEREF(__pyx_tuple__62);
29481 
29482  /* "ADR.pyx":982
29483  * self.coefficients.sdInfo[(0,0)][1],
29484  * self.q[('a',0,0)],
29485  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
29486  * self.q[('r',0)],
29487  * self.shockCapturing.lag,
29488  */
29489  __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 982, __pyx_L1_error)
29490  __Pyx_GOTREF(__pyx_tuple__63);
29491  __Pyx_GIVEREF(__pyx_tuple__63);
29492 
29493  /* "ADR.pyx":983
29494  * self.q[('a',0,0)],
29495  * self.q[('df',0,0)],
29496  * self.q[('r',0)], # <<<<<<<<<<<<<<
29497  * self.shockCapturing.lag,
29498  * self.shockCapturing.shockCapturingFactor,
29499  */
29500  __pyx_tuple__64 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 983, __pyx_L1_error)
29501  __Pyx_GOTREF(__pyx_tuple__64);
29502  __Pyx_GIVEREF(__pyx_tuple__64);
29503 
29504  /* "ADR.pyx":995
29505  * self.mesh.elementBoundaryElementsArray,
29506  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29507  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
29508  * self.ebqe[('df',0,0)],
29509  * self.numericalFlux.isDOFBoundary[0],
29510  */
29511  __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 995, __pyx_L1_error)
29512  __Pyx_GOTREF(__pyx_tuple__65);
29513  __Pyx_GIVEREF(__pyx_tuple__65);
29514 
29515  /* "ADR.pyx":996
29516  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29517  * self.ebqe[('a',0,0)],
29518  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
29519  * self.numericalFlux.isDOFBoundary[0],
29520  * self.numericalFlux.ebqe[('u',0)],
29521  */
29522  __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 996, __pyx_L1_error)
29523  __Pyx_GOTREF(__pyx_tuple__66);
29524  __Pyx_GIVEREF(__pyx_tuple__66);
29525 
29526  /* "ADR.pyx":998
29527  * self.ebqe[('df',0,0)],
29528  * self.numericalFlux.isDOFBoundary[0],
29529  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
29530  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29531  * self.ebqe[('advectiveFlux_bc_flag',0)],
29532  */
29533  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 998, __pyx_L1_error)
29534  __Pyx_GOTREF(__pyx_tuple__67);
29535  __Pyx_GIVEREF(__pyx_tuple__67);
29536 
29537  /* "ADR.pyx":999
29538  * self.numericalFlux.isDOFBoundary[0],
29539  * self.numericalFlux.ebqe[('u',0)],
29540  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
29541  * self.ebqe[('advectiveFlux_bc_flag',0)],
29542  * self.ebqe[('diffusiveFlux_bc',0,0)],
29543  */
29544  __pyx_tuple__68 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 999, __pyx_L1_error)
29545  __Pyx_GOTREF(__pyx_tuple__68);
29546  __Pyx_GIVEREF(__pyx_tuple__68);
29547 
29548  /* "ADR.pyx":1000
29549  * self.numericalFlux.ebqe[('u',0)],
29550  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29551  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
29552  * self.ebqe[('diffusiveFlux_bc',0,0)],
29553  * self.ebqe[('advectiveFlux_bc',0)],
29554  */
29555  __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1000, __pyx_L1_error)
29556  __Pyx_GOTREF(__pyx_tuple__69);
29557  __Pyx_GIVEREF(__pyx_tuple__69);
29558 
29559  /* "ADR.pyx":1001
29560  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29561  * self.ebqe[('advectiveFlux_bc_flag',0)],
29562  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
29563  * self.ebqe[('advectiveFlux_bc',0)],
29564  * self.ebqe['penalty'],
29565  */
29566  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1001, __pyx_L1_error)
29567  __Pyx_GOTREF(__pyx_tuple__70);
29568  __Pyx_GIVEREF(__pyx_tuple__70);
29569 
29570  /* "ADR.pyx":1002
29571  * self.ebqe[('advectiveFlux_bc_flag',0)],
29572  * self.ebqe[('diffusiveFlux_bc',0,0)],
29573  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
29574  * self.ebqe['penalty'],
29575  * self.numericalFlux.boundaryAdjoint_sigma)
29576  */
29577  __pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1002, __pyx_L1_error)
29578  __Pyx_GOTREF(__pyx_tuple__71);
29579  __Pyx_GIVEREF(__pyx_tuple__71);
29580 
29581  /* "ADR.pyx":1005
29582  * self.ebqe['penalty'],
29583  * self.numericalFlux.boundaryAdjoint_sigma)
29584  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
29585  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
29586  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
29587  */
29588  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Global_residual); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1005, __pyx_L1_error)
29589  __Pyx_GOTREF(__pyx_tuple__72);
29590  __Pyx_GIVEREF(__pyx_tuple__72);
29591 
29592  /* "ADR.pyx":1007
29593  * log("Global residual",level=9,data=r)
29594  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
29595  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
29596  * self.nonlinear_function_evaluations += 1
29597  * def getJacobian(self,jacobian):
29598  */
29599  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_Mass_Conservation_Error); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1007, __pyx_L1_error)
29600  __Pyx_GOTREF(__pyx_tuple__73);
29601  __Pyx_GIVEREF(__pyx_tuple__73);
29602 
29603  /* "ADR.pyx":1019
29604  * self.mesh.nodeArray,
29605  * self.mesh.elementNodesArray,
29606  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29607  * self.u[0].femSpace.psi,
29608  * self.u[0].femSpace.grad_psi,
29609  */
29610  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1019, __pyx_L1_error)
29611  __Pyx_GOTREF(__pyx_tuple__74);
29612  __Pyx_GIVEREF(__pyx_tuple__74);
29613 
29614  /* "ADR.pyx":1025
29615  * self.u[0].femSpace.grad_psi,
29616  * self.mesh.elementDiametersArray,
29617  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
29618  * self.shockCapturing.shockCapturingFactor,
29619  * self.coefficients.sc_uref,
29620  */
29621  __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1025, __pyx_L1_error)
29622  __Pyx_GOTREF(__pyx_tuple__75);
29623  __Pyx_GIVEREF(__pyx_tuple__75);
29624 
29625  /* "ADR.pyx":1033
29626  * self.u[0].femSpace.elementMaps.psi_trace,
29627  * self.u[0].femSpace.elementMaps.grad_psi_trace,
29628  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
29629  * self.u[0].femSpace.psi_trace,
29630  * self.u[0].femSpace.grad_psi_trace,
29631  */
29632  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1033, __pyx_L1_error)
29633  __Pyx_GOTREF(__pyx_tuple__76);
29634  __Pyx_GIVEREF(__pyx_tuple__76);
29635 
29636  /* "ADR.pyx":1043
29637  * self.u[0].femSpace.dofMap.l2g,
29638  * self.u[0].dof,
29639  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
29640  * self.coefficients.sdInfo[(0,0)][1],
29641  * self.q[('a',0,0)],
29642  */
29643  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1043, __pyx_L1_error)
29644  __Pyx_GOTREF(__pyx_tuple__77);
29645  __Pyx_GIVEREF(__pyx_tuple__77);
29646 
29647  /* "ADR.pyx":1044
29648  * self.u[0].dof,
29649  * self.coefficients.sdInfo[(0,0)][0],
29650  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
29651  * self.q[('a',0,0)],
29652  * self.q[('df',0,0)],
29653  */
29654  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1044, __pyx_L1_error)
29655  __Pyx_GOTREF(__pyx_tuple__78);
29656  __Pyx_GIVEREF(__pyx_tuple__78);
29657 
29658  /* "ADR.pyx":1045
29659  * self.coefficients.sdInfo[(0,0)][0],
29660  * self.coefficients.sdInfo[(0,0)][1],
29661  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
29662  * self.q[('df',0,0)],
29663  * self.q[('r',0)],
29664  */
29665  __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1045, __pyx_L1_error)
29666  __Pyx_GOTREF(__pyx_tuple__79);
29667  __Pyx_GIVEREF(__pyx_tuple__79);
29668 
29669  /* "ADR.pyx":1046
29670  * self.coefficients.sdInfo[(0,0)][1],
29671  * self.q[('a',0,0)],
29672  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
29673  * self.q[('r',0)],
29674  * self.shockCapturing.lag,
29675  */
29676  __pyx_tuple__80 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1046, __pyx_L1_error)
29677  __Pyx_GOTREF(__pyx_tuple__80);
29678  __Pyx_GIVEREF(__pyx_tuple__80);
29679 
29680  /* "ADR.pyx":1047
29681  * self.q[('a',0,0)],
29682  * self.q[('df',0,0)],
29683  * self.q[('r',0)], # <<<<<<<<<<<<<<
29684  * self.shockCapturing.lag,
29685  * self.shockCapturing.shockCapturingFactor,
29686  */
29687  __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1047, __pyx_L1_error)
29688  __Pyx_GOTREF(__pyx_tuple__81);
29689  __Pyx_GIVEREF(__pyx_tuple__81);
29690 
29691  /* "ADR.pyx":1052
29692  * self.shockCapturing.numDiff[0],
29693  * self.shockCapturing.numDiff_last[0],
29694  * self.csrRowIndeces[(0,0)], # <<<<<<<<<<<<<<
29695  * self.csrColumnOffsets[(0,0)],
29696  * jacobian,
29697  */
29698  __pyx_tuple__82 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1052, __pyx_L1_error)
29699  __Pyx_GOTREF(__pyx_tuple__82);
29700  __Pyx_GIVEREF(__pyx_tuple__82);
29701 
29702  /* "ADR.pyx":1053
29703  * self.shockCapturing.numDiff_last[0],
29704  * self.csrRowIndeces[(0,0)],
29705  * self.csrColumnOffsets[(0,0)], # <<<<<<<<<<<<<<
29706  * jacobian,
29707  * self.mesh.nExteriorElementBoundaries_global,
29708  */
29709  __pyx_tuple__83 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1053, __pyx_L1_error)
29710  __Pyx_GOTREF(__pyx_tuple__83);
29711  __Pyx_GIVEREF(__pyx_tuple__83);
29712 
29713  /* "ADR.pyx":1059
29714  * self.mesh.elementBoundaryElementsArray,
29715  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29716  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
29717  * self.ebqe[('df',0,0)],
29718  * self.numericalFlux.isDOFBoundary[0],
29719  */
29720  __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1059, __pyx_L1_error)
29721  __Pyx_GOTREF(__pyx_tuple__84);
29722  __Pyx_GIVEREF(__pyx_tuple__84);
29723 
29724  /* "ADR.pyx":1060
29725  * self.mesh.elementBoundaryLocalElementBoundariesArray,
29726  * self.ebqe[('a',0,0)],
29727  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
29728  * self.numericalFlux.isDOFBoundary[0],
29729  * self.numericalFlux.ebqe[('u',0)],
29730  */
29731  __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1060, __pyx_L1_error)
29732  __Pyx_GOTREF(__pyx_tuple__85);
29733  __Pyx_GIVEREF(__pyx_tuple__85);
29734 
29735  /* "ADR.pyx":1062
29736  * self.ebqe[('df',0,0)],
29737  * self.numericalFlux.isDOFBoundary[0],
29738  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
29739  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29740  * self.ebqe[('advectiveFlux_bc_flag',0)],
29741  */
29742  __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1062, __pyx_L1_error)
29743  __Pyx_GOTREF(__pyx_tuple__86);
29744  __Pyx_GIVEREF(__pyx_tuple__86);
29745 
29746  /* "ADR.pyx":1063
29747  * self.numericalFlux.isDOFBoundary[0],
29748  * self.numericalFlux.ebqe[('u',0)],
29749  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
29750  * self.ebqe[('advectiveFlux_bc_flag',0)],
29751  * self.ebqe[('diffusiveFlux_bc',0,0)],
29752  */
29753  __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1063, __pyx_L1_error)
29754  __Pyx_GOTREF(__pyx_tuple__87);
29755  __Pyx_GIVEREF(__pyx_tuple__87);
29756 
29757  /* "ADR.pyx":1064
29758  * self.numericalFlux.ebqe[('u',0)],
29759  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29760  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
29761  * self.ebqe[('diffusiveFlux_bc',0,0)],
29762  * self.ebqe[('advectiveFlux_bc',0)],
29763  */
29764  __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1064, __pyx_L1_error)
29765  __Pyx_GOTREF(__pyx_tuple__88);
29766  __Pyx_GIVEREF(__pyx_tuple__88);
29767 
29768  /* "ADR.pyx":1065
29769  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
29770  * self.ebqe[('advectiveFlux_bc_flag',0)],
29771  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
29772  * self.ebqe[('advectiveFlux_bc',0)],
29773  * self.csrColumnOffsets_eb[(0,0)],
29774  */
29775  __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1065, __pyx_L1_error)
29776  __Pyx_GOTREF(__pyx_tuple__89);
29777  __Pyx_GIVEREF(__pyx_tuple__89);
29778 
29779  /* "ADR.pyx":1066
29780  * self.ebqe[('advectiveFlux_bc_flag',0)],
29781  * self.ebqe[('diffusiveFlux_bc',0,0)],
29782  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
29783  * self.csrColumnOffsets_eb[(0,0)],
29784  * self.ebqe['penalty'],
29785  */
29786  __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1066, __pyx_L1_error)
29787  __Pyx_GOTREF(__pyx_tuple__90);
29788  __Pyx_GIVEREF(__pyx_tuple__90);
29789 
29790  /* "ADR.pyx":1067
29791  * self.ebqe[('diffusiveFlux_bc',0,0)],
29792  * self.ebqe[('advectiveFlux_bc',0)],
29793  * self.csrColumnOffsets_eb[(0,0)], # <<<<<<<<<<<<<<
29794  * self.ebqe['penalty'],
29795  * self.numericalFlux.boundaryAdjoint_sigma)
29796  */
29797  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1067, __pyx_L1_error)
29798  __Pyx_GOTREF(__pyx_tuple__91);
29799  __Pyx_GIVEREF(__pyx_tuple__91);
29800 
29801  /* "ADR.pyx":1070
29802  * self.ebqe['penalty'],
29803  * self.numericalFlux.boundaryAdjoint_sigma)
29804  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
29805  * #mwf decide if this is reasonable for solver statistics
29806  * self.nonlinear_function_jacobian_evaluations += 1
29807  */
29808  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_Jacobian); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1070, __pyx_L1_error)
29809  __Pyx_GOTREF(__pyx_tuple__92);
29810  __Pyx_GIVEREF(__pyx_tuple__92);
29811 
29812  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
29813  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
29814  * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
29815  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
29816  *
29817  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
29818  */
29819  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 218, __pyx_L1_error)
29820  __Pyx_GOTREF(__pyx_tuple__93);
29821  __Pyx_GIVEREF(__pyx_tuple__93);
29822 
29823  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
29824  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
29825  * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
29826  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
29827  *
29828  * info.buf = PyArray_DATA(self)
29829  */
29830  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 222, __pyx_L1_error)
29831  __Pyx_GOTREF(__pyx_tuple__94);
29832  __Pyx_GIVEREF(__pyx_tuple__94);
29833 
29834  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
29835  * if ((descr.byteorder == c'>' and little_endian) or
29836  * (descr.byteorder == c'<' and not little_endian)):
29837  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
29838  * if t == NPY_BYTE: f = "b"
29839  * elif t == NPY_UBYTE: f = "B"
29840  */
29841  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 259, __pyx_L1_error)
29842  __Pyx_GOTREF(__pyx_tuple__95);
29843  __Pyx_GIVEREF(__pyx_tuple__95);
29844 
29845  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
29846  *
29847  * if (end - f) - <int>(new_offset - offset[0]) < 15:
29848  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
29849  *
29850  * if ((child.byteorder == c'>' and little_endian) or
29851  */
29852  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 799, __pyx_L1_error)
29853  __Pyx_GOTREF(__pyx_tuple__96);
29854  __Pyx_GIVEREF(__pyx_tuple__96);
29855 
29856  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
29857  * if ((child.byteorder == c'>' and little_endian) or
29858  * (child.byteorder == c'<' and not little_endian)):
29859  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
29860  * # One could encode it in the format string and have Cython
29861  * # complain instead, BUT: < and > in format strings also imply
29862  */
29863  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(1, 803, __pyx_L1_error)
29864  __Pyx_GOTREF(__pyx_tuple__97);
29865  __Pyx_GIVEREF(__pyx_tuple__97);
29866 
29867  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
29868  * t = child.type_num
29869  * if end - f < 5:
29870  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
29871  *
29872  * # Until ticket #99 is fixed, use integers to avoid warnings
29873  */
29874  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 823, __pyx_L1_error)
29875  __Pyx_GOTREF(__pyx_tuple__98);
29876  __Pyx_GIVEREF(__pyx_tuple__98);
29877 
29878  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":989
29879  * _import_array()
29880  * except Exception:
29881  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
29882  *
29883  * cdef inline int import_umath() except -1:
29884  */
29885  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 989, __pyx_L1_error)
29886  __Pyx_GOTREF(__pyx_tuple__99);
29887  __Pyx_GIVEREF(__pyx_tuple__99);
29888 
29889  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":995
29890  * _import_umath()
29891  * except Exception:
29892  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
29893  *
29894  * cdef inline int import_ufunc() except -1:
29895  */
29896  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 995, __pyx_L1_error)
29897  __Pyx_GOTREF(__pyx_tuple__100);
29898  __Pyx_GIVEREF(__pyx_tuple__100);
29899 
29900  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":1001
29901  * _import_umath()
29902  * except Exception:
29903  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
29904  */
29905  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 1001, __pyx_L1_error)
29906  __Pyx_GOTREF(__pyx_tuple__101);
29907  __Pyx_GIVEREF(__pyx_tuple__101);
29908 
29909  /* "ADR.pyx":394
29910  * """
29911  *
29912  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
29913  * SGE_base.__init__(self,coefficients,nd,lag=False)
29914  * def initializeElementQuadrature(self,mesh,t,cq):
29915  */
29916  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 394, __pyx_L1_error)
29917  __Pyx_GOTREF(__pyx_tuple__102);
29918  __Pyx_GIVEREF(__pyx_tuple__102);
29919  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 394, __pyx_L1_error)
29920 
29921  /* "ADR.pyx":396
29922  * def __init__(self,coefficients,nd):
29923  * SGE_base.__init__(self,coefficients,nd,lag=False)
29924  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29925  * pass
29926  * def updateSubgridErrorHistory(self,initializationPhase=False):
29927  */
29928  __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 396, __pyx_L1_error)
29929  __Pyx_GOTREF(__pyx_tuple__104);
29930  __Pyx_GIVEREF(__pyx_tuple__104);
29931  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 396, __pyx_L1_error)
29932 
29933  /* "ADR.pyx":398
29934  * def initializeElementQuadrature(self,mesh,t,cq):
29935  * pass
29936  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
29937  * pass
29938  * def calculateSubgridError(self,q):
29939  */
29940  __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_initializationPhase); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 398, __pyx_L1_error)
29941  __Pyx_GOTREF(__pyx_tuple__106);
29942  __Pyx_GIVEREF(__pyx_tuple__106);
29943  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_updateSubgridErrorHistory, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 398, __pyx_L1_error)
29944  __pyx_tuple__108 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 398, __pyx_L1_error)
29945  __Pyx_GOTREF(__pyx_tuple__108);
29946  __Pyx_GIVEREF(__pyx_tuple__108);
29947 
29948  /* "ADR.pyx":400
29949  * def updateSubgridErrorHistory(self,initializationPhase=False):
29950  * pass
29951  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
29952  * pass
29953  *
29954  */
29955  __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_q); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 400, __pyx_L1_error)
29956  __Pyx_GOTREF(__pyx_tuple__109);
29957  __Pyx_GIVEREF(__pyx_tuple__109);
29958  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateSubgridError, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 400, __pyx_L1_error)
29959 
29960  /* "ADR.pyx":410
29961  * :parts: 2
29962  * """
29963  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
29964  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
29965  * self.nStepsToDelay = nStepsToDelay
29966  */
29967  __pyx_tuple__111 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd, __pyx_n_s_shockCapturingFactor, __pyx_n_s_lag, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 410, __pyx_L1_error)
29968  __Pyx_GOTREF(__pyx_tuple__111);
29969  __Pyx_GIVEREF(__pyx_tuple__111);
29970  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 410, __pyx_L1_error)
29971  __pyx_tuple__113 = PyTuple_Pack(3, ((PyObject*)__pyx_float_0_25), ((PyObject *)Py_True), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 410, __pyx_L1_error)
29972  __Pyx_GOTREF(__pyx_tuple__113);
29973  __Pyx_GIVEREF(__pyx_tuple__113);
29974 
29975  /* "ADR.pyx":418
29976  * self.nStepsToDelay=1
29977  * self.lag=False
29978  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29979  * self.mesh=mesh
29980  * self.numDiff=[]
29981  */
29982  __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 418, __pyx_L1_error)
29983  __Pyx_GOTREF(__pyx_tuple__114);
29984  __Pyx_GIVEREF(__pyx_tuple__114);
29985  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 418, __pyx_L1_error)
29986 
29987  /* "ADR.pyx":425
29988  * self.numDiff.append(cq[('numDiff',ci,ci)])
29989  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
29990  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
29991  * self.nSteps += 1
29992  * if self.lag:
29993  */
29994  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 425, __pyx_L1_error)
29995  __Pyx_GOTREF(__pyx_tuple__116);
29996  __Pyx_GIVEREF(__pyx_tuple__116);
29997  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_updateShockCapturingHistory, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 425, __pyx_L1_error)
29998 
29999  /* "ADR.pyx":439
30000  *
30001  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
30002  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30003  * getAdvectiveFluxBoundaryConditions,
30004  * getDiffusiveFluxBoundaryConditions):
30005  */
30006  __pyx_tuple__118 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 439, __pyx_L1_error)
30007  __Pyx_GOTREF(__pyx_tuple__118);
30008  __Pyx_GIVEREF(__pyx_tuple__118);
30009  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 439, __pyx_L1_error)
30010 
30011  /* "ADR.pyx":447
30012  *
30013  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
30014  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30015  * getAdvectiveFluxBoundaryConditions,
30016  * getDiffusiveFluxBoundaryConditions):
30017  */
30018  __pyx_tuple__120 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 447, __pyx_L1_error)
30019  __Pyx_GOTREF(__pyx_tuple__120);
30020  __Pyx_GIVEREF(__pyx_tuple__120);
30021  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 447, __pyx_L1_error)
30022 
30023  /* "ADR.pyx":455
30024  *
30025  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
30026  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30027  * getAdvectiveFluxBoundaryConditions,
30028  * getDiffusiveFluxBoundaryConditions):
30029  */
30030  __pyx_tuple__122 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 455, __pyx_L1_error)
30031  __Pyx_GOTREF(__pyx_tuple__122);
30032  __Pyx_GIVEREF(__pyx_tuple__122);
30033  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 455, __pyx_L1_error)
30034 
30035  /* "ADR.pyx":472
30036  * """
30037  * from proteus.ctransportCoefficients import L2projectEvaluate
30038  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
30039  * timeVaryingCoefficients=False,
30040  * forceStrongDirichlet=False,
30041  */
30042  __pyx_tuple__124 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_aOfX, __pyx_n_s_fOfX, __pyx_n_s_velocity, __pyx_n_s_nc, __pyx_n_s_nd, __pyx_n_s_l2proj, __pyx_n_s_timeVaryingCoefficients, __pyx_n_s_forceStrongDirichlet, __pyx_n_s_useMetrics, __pyx_n_s_sc_uref, __pyx_n_s_sc_beta, __pyx_n_s_mass, __pyx_n_s_advection, __pyx_n_s_diffusion, __pyx_n_s_potential, __pyx_n_s_reaction, __pyx_n_s_hamiltonian, __pyx_n_s_i, __pyx_n_s_sdInfo, __pyx_n_s_row); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 472, __pyx_L1_error)
30043  __Pyx_GOTREF(__pyx_tuple__124);
30044  __Pyx_GIVEREF(__pyx_tuple__124);
30045  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(12, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 472, __pyx_L1_error)
30046  __pyx_tuple__126 = PyTuple_Pack(9, ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_2), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject*)__pyx_float_0_0), ((PyObject*)__pyx_float_1_0), ((PyObject*)__pyx_float_1_0)); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 472, __pyx_L1_error)
30047  __Pyx_GOTREF(__pyx_tuple__126);
30048  __Pyx_GIVEREF(__pyx_tuple__126);
30049 
30050  /* "ADR.pyx":514
30051  * useSparseDiffusion=True,
30052  * movingDomain=False)
30053  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
30054  * nd = self.nd
30055  * for ci in range(self.nc):
30056  */
30057  __pyx_tuple__127 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 514, __pyx_L1_error)
30058  __Pyx_GOTREF(__pyx_tuple__127);
30059  __Pyx_GIVEREF(__pyx_tuple__127);
30060  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementQuadrature, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 514, __pyx_L1_error)
30061 
30062  /* "ADR.pyx":525
30063  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
30064  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
30065  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
30066  * nd = self.nd
30067  * for c in [cebq,cebq_global]:
30068  */
30069  __pyx_tuple__129 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebq, __pyx_n_s_cebq_global, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 525, __pyx_L1_error)
30070  __Pyx_GOTREF(__pyx_tuple__129);
30071  __Pyx_GIVEREF(__pyx_tuple__129);
30072  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeElementBoundaryQuadrat, 525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 525, __pyx_L1_error)
30073 
30074  /* "ADR.pyx":538
30075  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
30076  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
30077  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
30078  * nd = self.nd
30079  * for c in [cebqe]:
30080  */
30081  __pyx_tuple__131 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebqe, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 538, __pyx_L1_error)
30082  __Pyx_GOTREF(__pyx_tuple__131);
30083  __Pyx_GIVEREF(__pyx_tuple__131);
30084  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_initializeGlobalExteriorElementB, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 538, __pyx_L1_error)
30085 
30086  /* "ADR.pyx":551
30087  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
30088  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
30089  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
30090  * if self.timeVaryingCoefficients:
30091  * nd = self.nd
30092  */
30093  __pyx_tuple__133 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_c, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 551, __pyx_L1_error)
30094  __Pyx_GOTREF(__pyx_tuple__133);
30095  __Pyx_GIVEREF(__pyx_tuple__133);
30096  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_evaluate, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 551, __pyx_L1_error)
30097 
30098  /* "ADR.pyx":571
30099  * """
30100  * nCalls=0
30101  * def __init__(self, # <<<<<<<<<<<<<<
30102  * uDict,
30103  * phiDict,
30104  */
30105  __pyx_tuple__135 = PyTuple_Pack(56, __pyx_n_s_self, __pyx_n_s_uDict, __pyx_n_s_phiDict, __pyx_n_s_testSpaceDict, __pyx_n_s_matType, __pyx_n_s_dofBoundaryConditionsDict, __pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_n_s_coefficients, __pyx_n_s_elementQuadrature, __pyx_n_s_elementBoundaryQuadrature, __pyx_n_s_fluxBoundaryConditionsDict, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_n_s_stabilization, __pyx_n_s_shockCapturing, __pyx_n_s_conservativeFluxDict, __pyx_n_s_numericalFluxType, __pyx_n_s_TimeIntegrationClass, __pyx_n_s_massLumping, __pyx_n_s_reactionLumping, __pyx_n_s_options, __pyx_n_s_name, __pyx_n_s_reuse_trial_and_test_quadrature, __pyx_n_s_sd, __pyx_n_s_movingDomain, __pyx_n_s_Comm, __pyx_n_s_ci, __pyx_n_s_flag, __pyx_n_s_diffusionDict, __pyx_n_s_elementQuadratureDict, __pyx_n_s_elemQuadIsDict, __pyx_n_s_I, __pyx_n_s_elementBoundaryQuadratureDict, __pyx_n_s_cj, __pyx_n_s_ebNE, __pyx_n_s_ebN, __pyx_n_s_eN_global, __pyx_n_s_ebN_element, __pyx_n_s_i, __pyx_n_s_nI, __pyx_n_s_n, __pyx_n_s_comm, __pyx_n_s_k, __pyx_n_s_PostProcessingTools, __pyx_n_s_Archiver, __pyx_n_s_fbcObject, __pyx_n_s_t, __pyx_n_s_g, __pyx_n_s_ck, __pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_n_s_compKernelFlag, __pyx_n_s_u_j, __pyx_n_s_phi_k, __pyx_n_s_femSpace, __pyx_n_s_dc); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 571, __pyx_L1_error)
30106  __Pyx_GOTREF(__pyx_tuple__135);
30107  __Pyx_GIVEREF(__pyx_tuple__135);
30108  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(26, 0, 56, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_init, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 571, __pyx_L1_error)
30109  __pyx_tuple__137 = PyTuple_Pack(16, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_defaultName), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 571, __pyx_L1_error)
30110  __Pyx_GOTREF(__pyx_tuple__137);
30111  __Pyx_GIVEREF(__pyx_tuple__137);
30112 
30113  /* "ADR.pyx":934
30114  * compKernelFlag)
30115  * #mwf these are getting called by redistancing classes,
30116  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
30117  * pass
30118  * def getResidual(self,u,r):
30119  */
30120  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 934, __pyx_L1_error)
30121  __Pyx_GOTREF(__pyx_tuple__138);
30122  __Pyx_GIVEREF(__pyx_tuple__138);
30123  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateCoefficients, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 934, __pyx_L1_error)
30124 
30125  /* "ADR.pyx":936
30126  * def calculateCoefficients(self):
30127  * pass
30128  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
30129  * import pdb
30130  * import copy
30131  */
30132  __pyx_tuple__140 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_u, __pyx_n_s_r, __pyx_n_s_pdb, __pyx_n_s_copy, __pyx_n_s_globalSum); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 936, __pyx_L1_error)
30133  __Pyx_GOTREF(__pyx_tuple__140);
30134  __Pyx_GIVEREF(__pyx_tuple__140);
30135  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_getResidual, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 936, __pyx_L1_error)
30136 
30137  /* "ADR.pyx":1009
30138  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
30139  * self.nonlinear_function_evaluations += 1
30140  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
30141  * #import superluWrappers
30142  * #import numpy
30143  */
30144  __pyx_tuple__142 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_jacobian, __pyx_n_s_pdb); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1009, __pyx_L1_error)
30145  __Pyx_GOTREF(__pyx_tuple__142);
30146  __Pyx_GIVEREF(__pyx_tuple__142);
30147  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_getJacobian, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1009, __pyx_L1_error)
30148 
30149  /* "ADR.pyx":1074
30150  * self.nonlinear_function_jacobian_evaluations += 1
30151  * return jacobian
30152  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
30153  * """
30154  * Calculate the physical location and weights of the quadrature rules
30155  */
30156  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 1074, __pyx_L1_error)
30157  __Pyx_GOTREF(__pyx_tuple__144);
30158  __Pyx_GIVEREF(__pyx_tuple__144);
30159  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateElementQuadrature, 1074, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1074, __pyx_L1_error)
30160 
30161  /* "ADR.pyx":1093
30162  * if self.shockCapturing != None:
30163  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
30164  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
30165  * pass
30166  * def calculateExteriorElementBoundaryQuadrature(self):
30167  */
30168  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 1093, __pyx_L1_error)
30169  __Pyx_GOTREF(__pyx_tuple__146);
30170  __Pyx_GIVEREF(__pyx_tuple__146);
30171  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateElementBoundaryQuadratu, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1093, __pyx_L1_error)
30172 
30173  /* "ADR.pyx":1095
30174  * def calculateElementBoundaryQuadrature(self):
30175  * pass
30176  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
30177  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
30178  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
30179  */
30180  __pyx_tuple__148 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_cj); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1095, __pyx_L1_error)
30181  __Pyx_GOTREF(__pyx_tuple__148);
30182  __Pyx_GIVEREF(__pyx_tuple__148);
30183  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateExteriorElementBoundary, 1095, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1095, __pyx_L1_error)
30184 
30185  /* "ADR.pyx":1109
30186  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
30187  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
30188  * def estimate_mt(self): # <<<<<<<<<<<<<<
30189  * pass
30190  * def calculateAuxiliaryQuantitiesAfterStep(self):
30191  */
30192  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 1109, __pyx_L1_error)
30193  __Pyx_GOTREF(__pyx_tuple__150);
30194  __Pyx_GIVEREF(__pyx_tuple__150);
30195  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_estimate_mt, 1109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1109, __pyx_L1_error)
30196 
30197  /* "ADR.pyx":1111
30198  * def estimate_mt(self):
30199  * pass
30200  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
30201  * pass
30202  * def calculateSolutionAtQuadrature(self):
30203  */
30204  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 1111, __pyx_L1_error)
30205  __Pyx_GOTREF(__pyx_tuple__152);
30206  __Pyx_GIVEREF(__pyx_tuple__152);
30207  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1111, __pyx_L1_error)
30208 
30209  /* "ADR.pyx":1113
30210  * def calculateAuxiliaryQuantitiesAfterStep(self):
30211  * pass
30212  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
30213  * pass
30214  */
30215  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 1113, __pyx_L1_error)
30216  __Pyx_GOTREF(__pyx_tuple__154);
30217  __Pyx_GIVEREF(__pyx_tuple__154);
30218  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_cekees_proteus_proteus_ADR, __pyx_n_s_calculateSolutionAtQuadrature, 1113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1113, __pyx_L1_error)
30219  __Pyx_RefNannyFinishContext();
30220  return 0;
30221  __pyx_L1_error:;
30222  __Pyx_RefNannyFinishContext();
30223  return -1;
30224 }
30225 
30226 static int __Pyx_InitGlobals(void) {
30227  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
30228  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30229  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30230  __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(0, 1, __pyx_L1_error)
30231  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
30232  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
30233  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
30234  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
30235  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
30236  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
30237  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
30238  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
30239  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
30240  return 0;
30241  __pyx_L1_error:;
30242  return -1;
30243 }
30244 
30245 #if PY_MAJOR_VERSION < 3
30246 PyMODINIT_FUNC initADR(void); /*proto*/
30247 PyMODINIT_FUNC initADR(void)
30248 #else
30249 PyMODINIT_FUNC PyInit_ADR(void); /*proto*/
30250 PyMODINIT_FUNC PyInit_ADR(void)
30251 #endif
30252 {
30253  PyObject *__pyx_t_1 = NULL;
30254  PyObject *__pyx_t_2 = NULL;
30255  PyObject *__pyx_t_3 = NULL;
30256  PyObject *__pyx_t_4 = NULL;
30257  PyObject *__pyx_t_5 = NULL;
30258  __Pyx_RefNannyDeclarations
30259  #if CYTHON_REFNANNY
30260  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
30261  if (!__Pyx_RefNanny) {
30262  PyErr_Clear();
30263  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
30264  if (!__Pyx_RefNanny)
30265  Py_FatalError("failed to import 'refnanny' module");
30266  }
30267  #endif
30268  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_ADR(void)", 0);
30269  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30270  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
30271  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
30272  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
30273  #ifdef __Pyx_CyFunction_USED
30274  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30275  #endif
30276  #ifdef __Pyx_FusedFunction_USED
30277  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30278  #endif
30279  #ifdef __Pyx_Coroutine_USED
30280  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30281  #endif
30282  #ifdef __Pyx_Generator_USED
30283  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30284  #endif
30285  #ifdef __Pyx_StopAsyncIteration_USED
30286  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30287  #endif
30288  /*--- Library function declarations ---*/
30289  /*--- Threads initialization code ---*/
30290  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
30291  #ifdef WITH_THREAD /* Python build with threading support? */
30292  PyEval_InitThreads();
30293  #endif
30294  #endif
30295  /*--- Module creation code ---*/
30296  #if PY_MAJOR_VERSION < 3
30297  __pyx_m = Py_InitModule4("ADR", __pyx_methods, __pyx_k_An_optimized_Advection_Diffusio, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
30298  #else
30299  __pyx_m = PyModule_Create(&__pyx_moduledef);
30300  #endif
30301  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
30302  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
30303  Py_INCREF(__pyx_d);
30304  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
30305  #if CYTHON_COMPILING_IN_PYPY
30306  Py_INCREF(__pyx_b);
30307  #endif
30308  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
30309  /*--- Initialize various global constants etc. ---*/
30310  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30311  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
30312  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30313  #endif
30314  if (__pyx_module_is_main_ADR) {
30315  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30316  }
30317  #if PY_MAJOR_VERSION >= 3
30318  {
30319  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
30320  if (!PyDict_GetItemString(modules, "ADR")) {
30321  if (unlikely(PyDict_SetItemString(modules, "ADR", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
30322  }
30323  }
30324  #endif
30325  /*--- Builtin init code ---*/
30326  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30327  /*--- Constants init code ---*/
30328  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30329  /*--- Global init code ---*/
30330  /*--- Variable export code ---*/
30331  /*--- Function export code ---*/
30332  /*--- Type init code ---*/
30333  if (PyType_Ready(&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
30334  __pyx_type_3ADR_ADR.tp_print = 0;
30335  if (PyObject_SetAttrString(__pyx_m, "ADR", (PyObject *)&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
30336  __pyx_ptype_3ADR_ADR = &__pyx_type_3ADR_ADR;
30337  /*--- Type import code ---*/
30338  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
30339  #if CYTHON_COMPILING_IN_PYPY
30340  sizeof(PyTypeObject),
30341  #else
30342  sizeof(PyHeapTypeObject),
30343  #endif
30344  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
30345  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(1, 155, __pyx_L1_error)
30346  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(1, 168, __pyx_L1_error)
30347  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(1, 172, __pyx_L1_error)
30348  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(1, 181, __pyx_L1_error)
30349  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(1, 861, __pyx_L1_error)
30350  /*--- Variable import code ---*/
30351  /*--- Function import code ---*/
30352  /*--- Execution code ---*/
30353  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
30354  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
30355  #endif
30356 
30357  /* "ADR.pyx":6
30358  * """
30359  *
30360  * import numpy # <<<<<<<<<<<<<<
30361  * cimport numpy
30362  * from math import fabs
30363  */
30364  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
30365  __Pyx_GOTREF(__pyx_t_1);
30366  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
30367  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30368 
30369  /* "ADR.pyx":8
30370  * import numpy
30371  * cimport numpy
30372  * from math import fabs # <<<<<<<<<<<<<<
30373  * import proteus
30374  * from proteus import cfemIntegrals, Quadrature
30375  */
30376  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
30377  __Pyx_GOTREF(__pyx_t_1);
30378  __Pyx_INCREF(__pyx_n_s_fabs);
30379  __Pyx_GIVEREF(__pyx_n_s_fabs);
30380  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fabs);
30381  __pyx_t_2 = __Pyx_Import(__pyx_n_s_math, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
30382  __Pyx_GOTREF(__pyx_t_2);
30383  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30384  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fabs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
30385  __Pyx_GOTREF(__pyx_t_1);
30386  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fabs, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
30387  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30388  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30389 
30390  /* "ADR.pyx":9
30391  * cimport numpy
30392  * from math import fabs
30393  * import proteus # <<<<<<<<<<<<<<
30394  * from proteus import cfemIntegrals, Quadrature
30395  * from proteus.NonlinearSolvers import NonlinearEquation
30396  */
30397  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
30398  __Pyx_GOTREF(__pyx_t_2);
30399  if (PyDict_SetItem(__pyx_d, __pyx_n_s_proteus, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
30400  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30401 
30402  /* "ADR.pyx":10
30403  * from math import fabs
30404  * import proteus
30405  * from proteus import cfemIntegrals, Quadrature # <<<<<<<<<<<<<<
30406  * from proteus.NonlinearSolvers import NonlinearEquation
30407  * from proteus.FemTools import (DOFBoundaryConditions,
30408  */
30409  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30410  __Pyx_GOTREF(__pyx_t_2);
30411  __Pyx_INCREF(__pyx_n_s_cfemIntegrals);
30412  __Pyx_GIVEREF(__pyx_n_s_cfemIntegrals);
30413  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_cfemIntegrals);
30414  __Pyx_INCREF(__pyx_n_s_Quadrature);
30415  __Pyx_GIVEREF(__pyx_n_s_Quadrature);
30416  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Quadrature);
30417  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
30418  __Pyx_GOTREF(__pyx_t_1);
30419  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30420  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30421  __Pyx_GOTREF(__pyx_t_2);
30422  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cfemIntegrals, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
30423  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30424  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
30425  __Pyx_GOTREF(__pyx_t_2);
30426  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Quadrature, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
30427  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30428  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30429 
30430  /* "ADR.pyx":11
30431  * import proteus
30432  * from proteus import cfemIntegrals, Quadrature
30433  * from proteus.NonlinearSolvers import NonlinearEquation # <<<<<<<<<<<<<<
30434  * from proteus.FemTools import (DOFBoundaryConditions,
30435  * FluxBoundaryConditions,
30436  */
30437  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
30438  __Pyx_GOTREF(__pyx_t_1);
30439  __Pyx_INCREF(__pyx_n_s_NonlinearEquation);
30440  __Pyx_GIVEREF(__pyx_n_s_NonlinearEquation);
30441  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NonlinearEquation);
30442  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_NonlinearSolvers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
30443  __Pyx_GOTREF(__pyx_t_2);
30444  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30445  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
30446  __Pyx_GOTREF(__pyx_t_1);
30447  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearEquation, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
30448  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30450 
30451  /* "ADR.pyx":12
30452  * from proteus import cfemIntegrals, Quadrature
30453  * from proteus.NonlinearSolvers import NonlinearEquation
30454  * from proteus.FemTools import (DOFBoundaryConditions, # <<<<<<<<<<<<<<
30455  * FluxBoundaryConditions,
30456  * C0_AffineLinearOnSimplexWithNodalBasis)
30457  */
30458  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30459  __Pyx_GOTREF(__pyx_t_2);
30460  __Pyx_INCREF(__pyx_n_s_DOFBoundaryConditions);
30461  __Pyx_GIVEREF(__pyx_n_s_DOFBoundaryConditions);
30462  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DOFBoundaryConditions);
30463  __Pyx_INCREF(__pyx_n_s_FluxBoundaryConditions);
30464  __Pyx_GIVEREF(__pyx_n_s_FluxBoundaryConditions);
30465  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_FluxBoundaryConditions);
30466  __Pyx_INCREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30467  __Pyx_GIVEREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30468  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
30469  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_FemTools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
30470  __Pyx_GOTREF(__pyx_t_1);
30471  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30472  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30473  __Pyx_GOTREF(__pyx_t_2);
30474  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOFBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
30475  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30476  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30477  __Pyx_GOTREF(__pyx_t_2);
30478  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FluxBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
30479  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30480  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
30481  __Pyx_GOTREF(__pyx_t_2);
30482  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
30483  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30485 
30486  /* "ADR.pyx":15
30487  * FluxBoundaryConditions,
30488  * C0_AffineLinearOnSimplexWithNodalBasis)
30489  * from proteus.flcbdfWrappers import globalMax # <<<<<<<<<<<<<<
30490  * from proteus.Profiling import memory
30491  * from proteus.Profiling import logEvent as log
30492  */
30493  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
30494  __Pyx_GOTREF(__pyx_t_1);
30495  __Pyx_INCREF(__pyx_n_s_globalMax);
30496  __Pyx_GIVEREF(__pyx_n_s_globalMax);
30497  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_globalMax);
30498  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_flcbdfWrappers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
30499  __Pyx_GOTREF(__pyx_t_2);
30500  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30501  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
30502  __Pyx_GOTREF(__pyx_t_1);
30503  if (PyDict_SetItem(__pyx_d, __pyx_n_s_globalMax, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
30504  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30505  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30506 
30507  /* "ADR.pyx":16
30508  * C0_AffineLinearOnSimplexWithNodalBasis)
30509  * from proteus.flcbdfWrappers import globalMax
30510  * from proteus.Profiling import memory # <<<<<<<<<<<<<<
30511  * from proteus.Profiling import logEvent as log
30512  * from proteus.Transport import OneLevelTransport
30513  */
30514  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
30515  __Pyx_GOTREF(__pyx_t_2);
30516  __Pyx_INCREF(__pyx_n_s_memory);
30517  __Pyx_GIVEREF(__pyx_n_s_memory);
30518  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_memory);
30519  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
30520  __Pyx_GOTREF(__pyx_t_1);
30521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30522  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
30523  __Pyx_GOTREF(__pyx_t_2);
30524  if (PyDict_SetItem(__pyx_d, __pyx_n_s_memory, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
30525  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30527 
30528  /* "ADR.pyx":17
30529  * from proteus.flcbdfWrappers import globalMax
30530  * from proteus.Profiling import memory
30531  * from proteus.Profiling import logEvent as log # <<<<<<<<<<<<<<
30532  * from proteus.Transport import OneLevelTransport
30533  * from proteus.TransportCoefficients import TC_base
30534  */
30535  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
30536  __Pyx_GOTREF(__pyx_t_1);
30537  __Pyx_INCREF(__pyx_n_s_logEvent);
30538  __Pyx_GIVEREF(__pyx_n_s_logEvent);
30539  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_logEvent);
30540  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
30541  __Pyx_GOTREF(__pyx_t_2);
30542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30543  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
30544  __Pyx_GOTREF(__pyx_t_1);
30545  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
30546  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30547  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30548 
30549  /* "ADR.pyx":18
30550  * from proteus.Profiling import memory
30551  * from proteus.Profiling import logEvent as log
30552  * from proteus.Transport import OneLevelTransport # <<<<<<<<<<<<<<
30553  * from proteus.TransportCoefficients import TC_base
30554  * from proteus.SubgridError import SGE_base
30555  */
30556  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
30557  __Pyx_GOTREF(__pyx_t_2);
30558  __Pyx_INCREF(__pyx_n_s_OneLevelTransport);
30559  __Pyx_GIVEREF(__pyx_n_s_OneLevelTransport);
30560  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OneLevelTransport);
30561  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Transport, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
30562  __Pyx_GOTREF(__pyx_t_1);
30563  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30564  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
30565  __Pyx_GOTREF(__pyx_t_2);
30566  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneLevelTransport, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
30567  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30568  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30569 
30570  /* "ADR.pyx":19
30571  * from proteus.Profiling import logEvent as log
30572  * from proteus.Transport import OneLevelTransport
30573  * from proteus.TransportCoefficients import TC_base # <<<<<<<<<<<<<<
30574  * from proteus.SubgridError import SGE_base
30575  * from proteus.ShockCapturing import ShockCapturing_base
30576  */
30577  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
30578  __Pyx_GOTREF(__pyx_t_1);
30579  __Pyx_INCREF(__pyx_n_s_TC_base);
30580  __Pyx_GIVEREF(__pyx_n_s_TC_base);
30581  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TC_base);
30582  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_TransportCoefficients, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
30583  __Pyx_GOTREF(__pyx_t_2);
30584  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30585  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
30586  __Pyx_GOTREF(__pyx_t_1);
30587  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TC_base, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
30588  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30589  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30590 
30591  /* "ADR.pyx":20
30592  * from proteus.Transport import OneLevelTransport
30593  * from proteus.TransportCoefficients import TC_base
30594  * from proteus.SubgridError import SGE_base # <<<<<<<<<<<<<<
30595  * from proteus.ShockCapturing import ShockCapturing_base
30596  *
30597  */
30598  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
30599  __Pyx_GOTREF(__pyx_t_2);
30600  __Pyx_INCREF(__pyx_n_s_SGE_base);
30601  __Pyx_GIVEREF(__pyx_n_s_SGE_base);
30602  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SGE_base);
30603  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_SubgridError, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
30604  __Pyx_GOTREF(__pyx_t_1);
30605  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30606  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
30607  __Pyx_GOTREF(__pyx_t_2);
30608  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SGE_base, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
30609  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30610  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30611 
30612  /* "ADR.pyx":21
30613  * from proteus.TransportCoefficients import TC_base
30614  * from proteus.SubgridError import SGE_base
30615  * from proteus.ShockCapturing import ShockCapturing_base # <<<<<<<<<<<<<<
30616  *
30617  * cdef extern from "ADR.h" namespace "proteus":
30618  */
30619  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
30620  __Pyx_GOTREF(__pyx_t_1);
30621  __Pyx_INCREF(__pyx_n_s_ShockCapturing_base);
30622  __Pyx_GIVEREF(__pyx_n_s_ShockCapturing_base);
30623  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ShockCapturing_base);
30624  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_ShockCapturing, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
30625  __Pyx_GOTREF(__pyx_t_2);
30626  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30627  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
30628  __Pyx_GOTREF(__pyx_t_1);
30629  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing_base, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
30630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30631  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30632 
30633  /* "ADR.pyx":386
30634  *
30635  *
30636  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
30637  * """
30638  * SubgridError approximation for ADR equations
30639  */
30640  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
30641  __Pyx_GOTREF(__pyx_t_2);
30642  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
30643  __Pyx_GOTREF(__pyx_t_1);
30644  __Pyx_GIVEREF(__pyx_t_2);
30645  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30646  __pyx_t_2 = 0;
30647  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
30648  __Pyx_GOTREF(__pyx_t_2);
30649  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SubgridError, __pyx_n_s_SubgridError, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_SubgridError_approximation_for); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
30650  __Pyx_GOTREF(__pyx_t_3);
30651 
30652  /* "ADR.pyx":394
30653  * """
30654  *
30655  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
30656  * SGE_base.__init__(self,coefficients,nd,lag=False)
30657  * def initializeElementQuadrature(self,mesh,t,cq):
30658  */
30659  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_1__init__, 0, __pyx_n_s_SubgridError___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
30660  __Pyx_GOTREF(__pyx_t_4);
30661  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
30662  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30663 
30664  /* "ADR.pyx":396
30665  * def __init__(self,coefficients,nd):
30666  * SGE_base.__init__(self,coefficients,nd,lag=False)
30667  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
30668  * pass
30669  * def updateSubgridErrorHistory(self,initializationPhase=False):
30670  */
30671  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature, 0, __pyx_n_s_SubgridError_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error)
30672  __Pyx_GOTREF(__pyx_t_4);
30673  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(0, 396, __pyx_L1_error)
30674  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30675 
30676  /* "ADR.pyx":398
30677  * def initializeElementQuadrature(self,mesh,t,cq):
30678  * pass
30679  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
30680  * pass
30681  * def calculateSubgridError(self,q):
30682  */
30683  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory, 0, __pyx_n_s_SubgridError_updateSubgridErrorH, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
30684  __Pyx_GOTREF(__pyx_t_4);
30685  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__108);
30686  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_updateSubgridErrorHistory, __pyx_t_4) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
30687  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30688 
30689  /* "ADR.pyx":400
30690  * def updateSubgridErrorHistory(self,initializationPhase=False):
30691  * pass
30692  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
30693  * pass
30694  *
30695  */
30696  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_7calculateSubgridError, 0, __pyx_n_s_SubgridError_calculateSubgridErr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
30697  __Pyx_GOTREF(__pyx_t_4);
30698  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateSubgridError, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
30699  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30700 
30701  /* "ADR.pyx":386
30702  *
30703  *
30704  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
30705  * """
30706  * SubgridError approximation for ADR equations
30707  */
30708  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SubgridError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
30709  __Pyx_GOTREF(__pyx_t_4);
30710  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubgridError, __pyx_t_4) < 0) __PYX_ERR(0, 386, __pyx_L1_error)
30711  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30712  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30713  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30714  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30715 
30716  /* "ADR.pyx":403
30717  * pass
30718  *
30719  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
30720  * """
30721  * Residual-based shock capturing for ADR equations
30722  */
30723  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
30724  __Pyx_GOTREF(__pyx_t_1);
30725  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
30726  __Pyx_GOTREF(__pyx_t_2);
30727  __Pyx_GIVEREF(__pyx_t_1);
30728  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30729  __pyx_t_1 = 0;
30730  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error)
30731  __Pyx_GOTREF(__pyx_t_1);
30732  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ShockCapturing, __pyx_n_s_ShockCapturing, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Residual_based_shock_capturing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
30733  __Pyx_GOTREF(__pyx_t_3);
30734 
30735  /* "ADR.pyx":410
30736  * :parts: 2
30737  * """
30738  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
30739  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
30740  * self.nStepsToDelay = nStepsToDelay
30741  */
30742  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_1__init__, 0, __pyx_n_s_ShockCapturing___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error)
30743  __Pyx_GOTREF(__pyx_t_4);
30744  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__113);
30745  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
30746  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30747 
30748  /* "ADR.pyx":418
30749  * self.nStepsToDelay=1
30750  * self.lag=False
30751  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
30752  * self.mesh=mesh
30753  * self.numDiff=[]
30754  */
30755  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature, 0, __pyx_n_s_ShockCapturing_initializeElement, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
30756  __Pyx_GOTREF(__pyx_t_4);
30757  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(0, 418, __pyx_L1_error)
30758  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30759 
30760  /* "ADR.pyx":425
30761  * self.numDiff.append(cq[('numDiff',ci,ci)])
30762  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
30763  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
30764  * self.nSteps += 1
30765  * if self.lag:
30766  */
30767  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory, 0, __pyx_n_s_ShockCapturing_updateShockCaptur, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
30768  __Pyx_GOTREF(__pyx_t_4);
30769  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_updateShockCapturingHistory, __pyx_t_4) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
30770  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30771 
30772  /* "ADR.pyx":403
30773  * pass
30774  *
30775  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
30776  * """
30777  * Residual-based shock capturing for ADR equations
30778  */
30779  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ShockCapturing, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error)
30780  __Pyx_GOTREF(__pyx_t_4);
30781  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing, __pyx_t_4) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
30782  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30783  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30784  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30786 
30787  /* "ADR.pyx":438
30788  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
30789  *
30790  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
30791  * def __init__(self,vt,getPointwiseBoundaryConditions,
30792  * getAdvectiveFluxBoundaryConditions,
30793  */
30794  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30795  __Pyx_GOTREF(__pyx_t_2);
30796  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
30797  __Pyx_GOTREF(__pyx_t_1);
30798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30799  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30800  __Pyx_GOTREF(__pyx_t_2);
30801  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30802  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
30803  __Pyx_GOTREF(__pyx_t_1);
30804  __Pyx_GIVEREF(__pyx_t_2);
30805  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30806  __pyx_t_2 = 0;
30807  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
30808  __Pyx_GOTREF(__pyx_t_2);
30809  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_IIPG, __pyx_n_s_NumericalFlux_IIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error)
30810  __Pyx_GOTREF(__pyx_t_3);
30811 
30812  /* "ADR.pyx":439
30813  *
30814  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
30815  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30816  * getAdvectiveFluxBoundaryConditions,
30817  * getDiffusiveFluxBoundaryConditions):
30818  */
30819  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__, 0, __pyx_n_s_NumericalFlux_IIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
30820  __Pyx_GOTREF(__pyx_t_4);
30821  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 439, __pyx_L1_error)
30822  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30823 
30824  /* "ADR.pyx":438
30825  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
30826  *
30827  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
30828  * def __init__(self,vt,getPointwiseBoundaryConditions,
30829  * getAdvectiveFluxBoundaryConditions,
30830  */
30831  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 438, __pyx_L1_error)
30832  __Pyx_GOTREF(__pyx_t_4);
30833  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_4) < 0) __PYX_ERR(0, 438, __pyx_L1_error)
30834  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30835  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30836  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30838 
30839  /* "ADR.pyx":446
30840  * getDiffusiveFluxBoundaryConditions)
30841  *
30842  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
30843  * def __init__(self,vt,getPointwiseBoundaryConditions,
30844  * getAdvectiveFluxBoundaryConditions,
30845  */
30846  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30847  __Pyx_GOTREF(__pyx_t_1);
30848  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
30849  __Pyx_GOTREF(__pyx_t_2);
30850  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30851  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30852  __Pyx_GOTREF(__pyx_t_1);
30853  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30854  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
30855  __Pyx_GOTREF(__pyx_t_2);
30856  __Pyx_GIVEREF(__pyx_t_1);
30857  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30858  __pyx_t_1 = 0;
30859  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
30860  __Pyx_GOTREF(__pyx_t_1);
30861  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NumericalFlux_SIPG, __pyx_n_s_NumericalFlux_SIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 446, __pyx_L1_error)
30862  __Pyx_GOTREF(__pyx_t_3);
30863 
30864  /* "ADR.pyx":447
30865  *
30866  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
30867  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30868  * getAdvectiveFluxBoundaryConditions,
30869  * getDiffusiveFluxBoundaryConditions):
30870  */
30871  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__, 0, __pyx_n_s_NumericalFlux_SIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
30872  __Pyx_GOTREF(__pyx_t_4);
30873  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
30874  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30875 
30876  /* "ADR.pyx":446
30877  * getDiffusiveFluxBoundaryConditions)
30878  *
30879  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
30880  * def __init__(self,vt,getPointwiseBoundaryConditions,
30881  * getAdvectiveFluxBoundaryConditions,
30882  */
30883  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
30884  __Pyx_GOTREF(__pyx_t_4);
30885  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_4) < 0) __PYX_ERR(0, 446, __pyx_L1_error)
30886  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30887  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30888  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30889  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30890 
30891  /* "ADR.pyx":454
30892  * getDiffusiveFluxBoundaryConditions)
30893  *
30894  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
30895  * def __init__(self,vt,getPointwiseBoundaryConditions,
30896  * getAdvectiveFluxBoundaryConditions,
30897  */
30898  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30899  __Pyx_GOTREF(__pyx_t_2);
30900  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
30901  __Pyx_GOTREF(__pyx_t_1);
30902  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30903  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30904  __Pyx_GOTREF(__pyx_t_2);
30905  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30906  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
30907  __Pyx_GOTREF(__pyx_t_1);
30908  __Pyx_GIVEREF(__pyx_t_2);
30909  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
30910  __pyx_t_2 = 0;
30911  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
30912  __Pyx_GOTREF(__pyx_t_2);
30913  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_NIPG, __pyx_n_s_NumericalFlux_NIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
30914  __Pyx_GOTREF(__pyx_t_3);
30915 
30916  /* "ADR.pyx":455
30917  *
30918  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
30919  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
30920  * getAdvectiveFluxBoundaryConditions,
30921  * getDiffusiveFluxBoundaryConditions):
30922  */
30923  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__, 0, __pyx_n_s_NumericalFlux_NIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
30924  __Pyx_GOTREF(__pyx_t_4);
30925  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
30926  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30927 
30928  /* "ADR.pyx":454
30929  * getDiffusiveFluxBoundaryConditions)
30930  *
30931  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
30932  * def __init__(self,vt,getPointwiseBoundaryConditions,
30933  * getAdvectiveFluxBoundaryConditions,
30934  */
30935  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
30936  __Pyx_GOTREF(__pyx_t_4);
30937  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_4) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
30938  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30939  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30940  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30941  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30942 
30943  /* "ADR.pyx":462
30944  * getDiffusiveFluxBoundaryConditions)
30945  *
30946  * NumericalFlux = NumericalFlux_SIPG # <<<<<<<<<<<<<<
30947  *
30948  * class Coefficients(TC_base):
30949  */
30950  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericalFlux_SIPG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
30951  __Pyx_GOTREF(__pyx_t_1);
30952  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux, __pyx_t_1) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
30953  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30954 
30955  /* "ADR.pyx":464
30956  * NumericalFlux = NumericalFlux_SIPG
30957  *
30958  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
30959  * """
30960  * Coefficients of linear ADR equations
30961  */
30962  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
30963  __Pyx_GOTREF(__pyx_t_1);
30964  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
30965  __Pyx_GOTREF(__pyx_t_2);
30966  __Pyx_GIVEREF(__pyx_t_1);
30967  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
30968  __pyx_t_1 = 0;
30969  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
30970  __Pyx_GOTREF(__pyx_t_1);
30971  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Coefficients, __pyx_n_s_Coefficients, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Coefficients_of_linear_ADR_equa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
30972  __Pyx_GOTREF(__pyx_t_3);
30973 
30974  /* "ADR.pyx":471
30975  * :parts: 2
30976  * """
30977  * from proteus.ctransportCoefficients import L2projectEvaluate # <<<<<<<<<<<<<<
30978  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
30979  * timeVaryingCoefficients=False,
30980  */
30981  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
30982  __Pyx_GOTREF(__pyx_t_4);
30983  __Pyx_INCREF(__pyx_n_s_L2projectEvaluate);
30984  __Pyx_GIVEREF(__pyx_n_s_L2projectEvaluate);
30985  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_L2projectEvaluate);
30986  __pyx_t_5 = __Pyx_Import(__pyx_n_s_proteus_ctransportCoefficients, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
30987  __Pyx_GOTREF(__pyx_t_5);
30988  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30989  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_L2projectEvaluate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
30990  __Pyx_GOTREF(__pyx_t_4);
30991  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_L2projectEvaluate, __pyx_t_4) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
30992  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30993  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30994 
30995  /* "ADR.pyx":472
30996  * """
30997  * from proteus.ctransportCoefficients import L2projectEvaluate
30998  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
30999  * timeVaryingCoefficients=False,
31000  * forceStrongDirichlet=False,
31001  */
31002  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_1__init__, 0, __pyx_n_s_Coefficients___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L1_error)
31003  __Pyx_GOTREF(__pyx_t_5);
31004  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__126);
31005  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
31006  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31007 
31008  /* "ADR.pyx":514
31009  * useSparseDiffusion=True,
31010  * movingDomain=False)
31011  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
31012  * nd = self.nd
31013  * for ci in range(self.nc):
31014  */
31015  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature, 0, __pyx_n_s_Coefficients_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
31016  __Pyx_GOTREF(__pyx_t_5);
31017  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
31018  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31019 
31020  /* "ADR.pyx":525
31021  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
31022  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
31023  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
31024  * nd = self.nd
31025  * for c in [cebq,cebq_global]:
31026  */
31027  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeElementBo, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error)
31028  __Pyx_GOTREF(__pyx_t_5);
31029  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeElementBoundaryQuadrat, __pyx_t_5) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
31030  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31031 
31032  /* "ADR.pyx":538
31033  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
31034  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31035  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
31036  * nd = self.nd
31037  * for c in [cebqe]:
31038  */
31039  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeGlobalExt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
31040  __Pyx_GOTREF(__pyx_t_5);
31041  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_initializeGlobalExteriorElementB, __pyx_t_5) < 0) __PYX_ERR(0, 538, __pyx_L1_error)
31042  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31043 
31044  /* "ADR.pyx":551
31045  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
31046  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31047  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
31048  * if self.timeVaryingCoefficients:
31049  * nd = self.nd
31050  */
31051  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_9evaluate, 0, __pyx_n_s_Coefficients_evaluate, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 551, __pyx_L1_error)
31052  __Pyx_GOTREF(__pyx_t_5);
31053  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_evaluate, __pyx_t_5) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
31054  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31055 
31056  /* "ADR.pyx":464
31057  * NumericalFlux = NumericalFlux_SIPG
31058  *
31059  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
31060  * """
31061  * Coefficients of linear ADR equations
31062  */
31063  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Coefficients, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
31064  __Pyx_GOTREF(__pyx_t_5);
31065  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Coefficients, __pyx_t_5) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
31066  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31067  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31068  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31069  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31070 
31071  /* "ADR.pyx":563
31072  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31073  *
31074  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
31075  * """
31076  * Optimized LevelModel for ADR equations
31077  */
31078  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31079  __Pyx_GOTREF(__pyx_t_2);
31080  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Transport); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
31081  __Pyx_GOTREF(__pyx_t_1);
31082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31083  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31084  __Pyx_GOTREF(__pyx_t_2);
31085  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31086  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
31087  __Pyx_GOTREF(__pyx_t_1);
31088  __Pyx_GIVEREF(__pyx_t_2);
31089  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
31090  __pyx_t_2 = 0;
31091  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
31092  __Pyx_GOTREF(__pyx_t_2);
31093  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LevelModel, __pyx_n_s_LevelModel, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Optimized_LevelModel_for_ADR_eq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
31094  __Pyx_GOTREF(__pyx_t_3);
31095 
31096  /* "ADR.pyx":570
31097  * :parts: 2
31098  * """
31099  * nCalls=0 # <<<<<<<<<<<<<<
31100  * def __init__(self,
31101  * uDict,
31102  */
31103  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_nCalls, __pyx_int_0) < 0) __PYX_ERR(0, 570, __pyx_L1_error)
31104 
31105  /* "ADR.pyx":571
31106  * """
31107  * nCalls=0
31108  * def __init__(self, # <<<<<<<<<<<<<<
31109  * uDict,
31110  * phiDict,
31111  */
31112  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_1__init__, 0, __pyx_n_s_LevelModel___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
31113  __Pyx_GOTREF(__pyx_t_5);
31114  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__137);
31115  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
31116  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31117 
31118  /* "ADR.pyx":934
31119  * compKernelFlag)
31120  * #mwf these are getting called by redistancing classes,
31121  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
31122  * pass
31123  * def getResidual(self,u,r):
31124  */
31125  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_3calculateCoefficients, 0, __pyx_n_s_LevelModel_calculateCoefficients, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error)
31126  __Pyx_GOTREF(__pyx_t_5);
31127  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateCoefficients, __pyx_t_5) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
31128  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31129 
31130  /* "ADR.pyx":936
31131  * def calculateCoefficients(self):
31132  * pass
31133  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
31134  * import pdb
31135  * import copy
31136  */
31137  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_5getResidual, 0, __pyx_n_s_LevelModel_getResidual, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error)
31138  __Pyx_GOTREF(__pyx_t_5);
31139  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getResidual, __pyx_t_5) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
31140  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31141 
31142  /* "ADR.pyx":1009
31143  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
31144  * self.nonlinear_function_evaluations += 1
31145  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
31146  * #import superluWrappers
31147  * #import numpy
31148  */
31149  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_7getJacobian, 0, __pyx_n_s_LevelModel_getJacobian, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
31150  __Pyx_GOTREF(__pyx_t_5);
31151  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getJacobian, __pyx_t_5) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)
31152  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31153 
31154  /* "ADR.pyx":1074
31155  * self.nonlinear_function_jacobian_evaluations += 1
31156  * return jacobian
31157  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
31158  * """
31159  * Calculate the physical location and weights of the quadrature rules
31160  */
31161  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature, 0, __pyx_n_s_LevelModel_calculateElementQuadr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error)
31162  __Pyx_GOTREF(__pyx_t_5);
31163  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 1074, __pyx_L1_error)
31164  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31165 
31166  /* "ADR.pyx":1093
31167  * if self.shockCapturing != None:
31168  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
31169  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
31170  * pass
31171  * def calculateExteriorElementBoundaryQuadrature(self):
31172  */
31173  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateElementBound, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L1_error)
31174  __Pyx_GOTREF(__pyx_t_5);
31175  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateElementBoundaryQuadratu, __pyx_t_5) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
31176  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31177 
31178  /* "ADR.pyx":1095
31179  * def calculateElementBoundaryQuadrature(self):
31180  * pass
31181  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
31182  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
31183  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
31184  */
31185  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateExteriorElem, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
31186  __Pyx_GOTREF(__pyx_t_5);
31187  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateExteriorElementBoundary, __pyx_t_5) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
31188  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31189 
31190  /* "ADR.pyx":1109
31191  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
31192  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
31193  * def estimate_mt(self): # <<<<<<<<<<<<<<
31194  * pass
31195  * def calculateAuxiliaryQuantitiesAfterStep(self):
31196  */
31197  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_15estimate_mt, 0, __pyx_n_s_LevelModel_estimate_mt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
31198  __Pyx_GOTREF(__pyx_t_5);
31199  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_estimate_mt, __pyx_t_5) < 0) __PYX_ERR(0, 1109, __pyx_L1_error)
31200  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31201 
31202  /* "ADR.pyx":1111
31203  * def estimate_mt(self):
31204  * pass
31205  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
31206  * pass
31207  * def calculateSolutionAtQuadrature(self):
31208  */
31209  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, 0, __pyx_n_s_LevelModel_calculateAuxiliaryQua, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
31210  __Pyx_GOTREF(__pyx_t_5);
31211  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_t_5) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)
31212  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31213 
31214  /* "ADR.pyx":1113
31215  * def calculateAuxiliaryQuantitiesAfterStep(self):
31216  * pass
31217  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
31218  * pass
31219  */
31220  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature, 0, __pyx_n_s_LevelModel_calculateSolutionAtQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
31221  __Pyx_GOTREF(__pyx_t_5);
31222  if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_calculateSolutionAtQuadrature, __pyx_t_5) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
31223  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31224 
31225  /* "ADR.pyx":563
31226  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
31227  *
31228  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
31229  * """
31230  * Optimized LevelModel for ADR equations
31231  */
31232  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LevelModel, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
31233  __Pyx_GOTREF(__pyx_t_5);
31234  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LevelModel, __pyx_t_5) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
31235  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31236  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31237  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31238  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31239 
31240  /* "ADR.pyx":1
31241  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
31242  * """
31243  * An optimized Advection-Diffusion-Reaction module
31244  */
31245  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
31246  __Pyx_GOTREF(__pyx_t_1);
31247  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
31248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31249 
31250  /* "linux2/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":997
31251  * raise ImportError("numpy.core.umath failed to import")
31252  *
31253  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
31254  * try:
31255  * _import_umath()
31256  */
31257 
31258  /*--- Wrapped vars code ---*/
31259 
31260  goto __pyx_L0;
31261  __pyx_L1_error:;
31262  __Pyx_XDECREF(__pyx_t_1);
31263  __Pyx_XDECREF(__pyx_t_2);
31264  __Pyx_XDECREF(__pyx_t_3);
31265  __Pyx_XDECREF(__pyx_t_4);
31266  __Pyx_XDECREF(__pyx_t_5);
31267  if (__pyx_m) {
31268  if (__pyx_d) {
31269  __Pyx_AddTraceback("init ADR", __pyx_clineno, __pyx_lineno, __pyx_filename);
31270  }
31271  Py_DECREF(__pyx_m); __pyx_m = 0;
31272  } else if (!PyErr_Occurred()) {
31273  PyErr_SetString(PyExc_ImportError, "init ADR");
31274  }
31275  __pyx_L0:;
31276  __Pyx_RefNannyFinishContext();
31277  #if PY_MAJOR_VERSION < 3
31278  return;
31279  #else
31280  return __pyx_m;
31281  #endif
31282 }
31283 
31284 /* --- Runtime support code --- */
31285 /* Refnanny */
31286 #if CYTHON_REFNANNY
31287 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
31288  PyObject *m = NULL, *p = NULL;
31289  void *r = NULL;
31290  m = PyImport_ImportModule((char *)modname);
31291  if (!m) goto end;
31292  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
31293  if (!p) goto end;
31294  r = PyLong_AsVoidPtr(p);
31295 end:
31296  Py_XDECREF(p);
31297  Py_XDECREF(m);
31298  return (__Pyx_RefNannyAPIStruct *)r;
31299 }
31300 #endif
31301 
31302 /* GetBuiltinName */
31303 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
31304  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
31305  if (unlikely(!result)) {
31306  PyErr_Format(PyExc_NameError,
31307 #if PY_MAJOR_VERSION >= 3
31308  "name '%U' is not defined", name);
31309 #else
31310  "name '%.200s' is not defined", PyString_AS_STRING(name));
31311 #endif
31312  }
31313  return result;
31314 }
31315 
31316 /* RaiseArgTupleInvalid */
31317 static void __Pyx_RaiseArgtupleInvalid(
31318  const char* func_name,
31319  int exact,
31320  Py_ssize_t num_min,
31321  Py_ssize_t num_max,
31322  Py_ssize_t num_found)
31323 {
31324  Py_ssize_t num_expected;
31325  const char *more_or_less;
31326  if (num_found < num_min) {
31327  num_expected = num_min;
31328  more_or_less = "at least";
31329  } else {
31330  num_expected = num_max;
31331  more_or_less = "at most";
31332  }
31333  if (exact) {
31334  more_or_less = "exactly";
31335  }
31336  PyErr_Format(PyExc_TypeError,
31337  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
31338  func_name, more_or_less, num_expected,
31339  (num_expected == 1) ? "" : "s", num_found);
31340 }
31341 
31342 /* RaiseDoubleKeywords */
31343 static void __Pyx_RaiseDoubleKeywordsError(
31344  const char* func_name,
31345  PyObject* kw_name)
31346 {
31347  PyErr_Format(PyExc_TypeError,
31348  #if PY_MAJOR_VERSION >= 3
31349  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
31350  #else
31351  "%s() got multiple values for keyword argument '%s'", func_name,
31352  PyString_AsString(kw_name));
31353  #endif
31354 }
31355 
31356 /* ParseKeywords */
31357 static int __Pyx_ParseOptionalKeywords(
31358  PyObject *kwds,
31359  PyObject **argnames[],
31360  PyObject *kwds2,
31361  PyObject *values[],
31362  Py_ssize_t num_pos_args,
31363  const char* function_name)
31364 {
31365  PyObject *key = 0, *value = 0;
31366  Py_ssize_t pos = 0;
31367  PyObject*** name;
31368  PyObject*** first_kw_arg = argnames + num_pos_args;
31369  while (PyDict_Next(kwds, &pos, &key, &value)) {
31370  name = first_kw_arg;
31371  while (*name && (**name != key)) name++;
31372  if (*name) {
31373  values[name-argnames] = value;
31374  continue;
31375  }
31376  name = first_kw_arg;
31377  #if PY_MAJOR_VERSION < 3
31378  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
31379  while (*name) {
31380  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
31381  && _PyString_Eq(**name, key)) {
31382  values[name-argnames] = value;
31383  break;
31384  }
31385  name++;
31386  }
31387  if (*name) continue;
31388  else {
31389  PyObject*** argname = argnames;
31390  while (argname != first_kw_arg) {
31391  if ((**argname == key) || (
31392  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
31393  && _PyString_Eq(**argname, key))) {
31394  goto arg_passed_twice;
31395  }
31396  argname++;
31397  }
31398  }
31399  } else
31400  #endif
31401  if (likely(PyUnicode_Check(key))) {
31402  while (*name) {
31403  int cmp = (**name == key) ? 0 :
31404  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
31405  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
31406  #endif
31407  PyUnicode_Compare(**name, key);
31408  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
31409  if (cmp == 0) {
31410  values[name-argnames] = value;
31411  break;
31412  }
31413  name++;
31414  }
31415  if (*name) continue;
31416  else {
31417  PyObject*** argname = argnames;
31418  while (argname != first_kw_arg) {
31419  int cmp = (**argname == key) ? 0 :
31420  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
31421  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
31422  #endif
31423  PyUnicode_Compare(**argname, key);
31424  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
31425  if (cmp == 0) goto arg_passed_twice;
31426  argname++;
31427  }
31428  }
31429  } else
31430  goto invalid_keyword_type;
31431  if (kwds2) {
31432  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
31433  } else {
31434  goto invalid_keyword;
31435  }
31436  }
31437  return 0;
31438 arg_passed_twice:
31439  __Pyx_RaiseDoubleKeywordsError(function_name, key);
31440  goto bad;
31441 invalid_keyword_type:
31442  PyErr_Format(PyExc_TypeError,
31443  "%.200s() keywords must be strings", function_name);
31444  goto bad;
31445 invalid_keyword:
31446  PyErr_Format(PyExc_TypeError,
31447  #if PY_MAJOR_VERSION < 3
31448  "%.200s() got an unexpected keyword argument '%.200s'",
31449  function_name, PyString_AsString(key));
31450  #else
31451  "%s() got an unexpected keyword argument '%U'",
31452  function_name, key);
31453  #endif
31454 bad:
31455  return -1;
31456 }
31457 
31458 /* ArgTypeTest */
31459 static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
31460  PyErr_Format(PyExc_TypeError,
31461  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
31462  name, type->tp_name, Py_TYPE(obj)->tp_name);
31463 }
31464 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
31465  const char *name, int exact)
31466 {
31467  if (unlikely(!type)) {
31468  PyErr_SetString(PyExc_SystemError, "Missing type object");
31469  return 0;
31470  }
31471  if (none_allowed && obj == Py_None) return 1;
31472  else if (exact) {
31473  if (likely(Py_TYPE(obj) == type)) return 1;
31474  #if PY_MAJOR_VERSION == 2
31475  else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
31476  #endif
31477  }
31478  else {
31479  if (likely(PyObject_TypeCheck(obj, type))) return 1;
31480  }
31481  __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
31482  return 0;
31483 }
31484 
31485 /* PyCFunctionFastCall */
31486 #if CYTHON_FAST_PYCCALL
31487 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
31488  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
31489  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
31490  PyObject *self = PyCFunction_GET_SELF(func);
31491  assert(PyCFunction_Check(func));
31492  assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
31493  assert(nargs >= 0);
31494  assert(nargs == 0 || args != NULL);
31495  /* _PyCFunction_FastCallDict() must not be called with an exception set,
31496  because it may clear it (directly or indirectly) and so the
31497  caller loses its exception */
31498  assert(!PyErr_Occurred());
31499  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
31500 }
31501 #endif // CYTHON_FAST_PYCCALL
31502 
31503 /* PyFunctionFastCall */
31504 #if CYTHON_FAST_PYCALL
31505 #include "frameobject.h"
31506 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
31507  PyObject *globals) {
31508  PyFrameObject *f;
31509  PyThreadState *tstate = PyThreadState_GET();
31510  PyObject **fastlocals;
31511  Py_ssize_t i;
31512  PyObject *result;
31513  assert(globals != NULL);
31514  /* XXX Perhaps we should create a specialized
31515  PyFrame_New() that doesn't take locals, but does
31516  take builtins without sanity checking them.
31517  */
31518  assert(tstate != NULL);
31519  f = PyFrame_New(tstate, co, globals, NULL);
31520  if (f == NULL) {
31521  return NULL;
31522  }
31523  fastlocals = f->f_localsplus;
31524  for (i = 0; i < na; i++) {
31525  Py_INCREF(*args);
31526  fastlocals[i] = *args++;
31527  }
31528  result = PyEval_EvalFrameEx(f,0);
31529  ++tstate->recursion_depth;
31530  Py_DECREF(f);
31531  --tstate->recursion_depth;
31532  return result;
31533 }
31534 #if 1 || PY_VERSION_HEX < 0x030600B1
31535 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
31536  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
31537  PyObject *globals = PyFunction_GET_GLOBALS(func);
31538  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
31539  PyObject *closure;
31540 #if PY_MAJOR_VERSION >= 3
31541  PyObject *kwdefs;
31542 #endif
31543  PyObject *kwtuple, **k;
31544  PyObject **d;
31545  Py_ssize_t nd;
31546  Py_ssize_t nk;
31547  PyObject *result;
31548  assert(kwargs == NULL || PyDict_Check(kwargs));
31549  nk = kwargs ? PyDict_Size(kwargs) : 0;
31550  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
31551  return NULL;
31552  }
31553  if (
31554 #if PY_MAJOR_VERSION >= 3
31555  co->co_kwonlyargcount == 0 &&
31556 #endif
31557  likely(kwargs == NULL || nk == 0) &&
31558  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
31559  if (argdefs == NULL && co->co_argcount == nargs) {
31560  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
31561  goto done;
31562  }
31563  else if (nargs == 0 && argdefs != NULL
31564  && co->co_argcount == Py_SIZE(argdefs)) {
31565  /* function called with no arguments, but all parameters have
31566  a default value: use default values as arguments .*/
31567  args = &PyTuple_GET_ITEM(argdefs, 0);
31568  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
31569  goto done;
31570  }
31571  }
31572  if (kwargs != NULL) {
31573  Py_ssize_t pos, i;
31574  kwtuple = PyTuple_New(2 * nk);
31575  if (kwtuple == NULL) {
31576  result = NULL;
31577  goto done;
31578  }
31579  k = &PyTuple_GET_ITEM(kwtuple, 0);
31580  pos = i = 0;
31581  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
31582  Py_INCREF(k[i]);
31583  Py_INCREF(k[i+1]);
31584  i += 2;
31585  }
31586  nk = i / 2;
31587  }
31588  else {
31589  kwtuple = NULL;
31590  k = NULL;
31591  }
31592  closure = PyFunction_GET_CLOSURE(func);
31593 #if PY_MAJOR_VERSION >= 3
31594  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
31595 #endif
31596  if (argdefs != NULL) {
31597  d = &PyTuple_GET_ITEM(argdefs, 0);
31598  nd = Py_SIZE(argdefs);
31599  }
31600  else {
31601  d = NULL;
31602  nd = 0;
31603  }
31604 #if PY_MAJOR_VERSION >= 3
31605  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
31606  args, nargs,
31607  k, (int)nk,
31608  d, (int)nd, kwdefs, closure);
31609 #else
31610  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
31611  args, nargs,
31612  k, (int)nk,
31613  d, (int)nd, closure);
31614 #endif
31615  Py_XDECREF(kwtuple);
31616 done:
31617  Py_LeaveRecursiveCall();
31618  return result;
31619 }
31620 #endif // CPython < 3.6
31621 #endif // CYTHON_FAST_PYCALL
31622 
31623 /* PyObjectCall */
31624 #if CYTHON_COMPILING_IN_CPYTHON
31625 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
31626  PyObject *result;
31627  ternaryfunc call = func->ob_type->tp_call;
31628  if (unlikely(!call))
31629  return PyObject_Call(func, arg, kw);
31630  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
31631  return NULL;
31632  result = (*call)(func, arg, kw);
31633  Py_LeaveRecursiveCall();
31634  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31635  PyErr_SetString(
31636  PyExc_SystemError,
31637  "NULL result without error in PyObject_Call");
31638  }
31639  return result;
31640 }
31641 #endif
31642 
31643 /* PyObjectCallMethO */
31644 #if CYTHON_COMPILING_IN_CPYTHON
31645 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
31646  PyObject *self, *result;
31647  PyCFunction cfunc;
31648  cfunc = PyCFunction_GET_FUNCTION(func);
31649  self = PyCFunction_GET_SELF(func);
31650  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
31651  return NULL;
31652  result = cfunc(self, arg);
31653  Py_LeaveRecursiveCall();
31654  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
31655  PyErr_SetString(
31656  PyExc_SystemError,
31657  "NULL result without error in PyObject_Call");
31658  }
31659  return result;
31660 }
31661 #endif
31662 
31663 /* PyObjectCallOneArg */
31664 #if CYTHON_COMPILING_IN_CPYTHON
31665 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31666  PyObject *result;
31667  PyObject *args = PyTuple_New(1);
31668  if (unlikely(!args)) return NULL;
31669  Py_INCREF(arg);
31670  PyTuple_SET_ITEM(args, 0, arg);
31671  result = __Pyx_PyObject_Call(func, args, NULL);
31672  Py_DECREF(args);
31673  return result;
31674 }
31675 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31676 #if CYTHON_FAST_PYCALL
31677  if (PyFunction_Check(func)) {
31678  return __Pyx_PyFunction_FastCall(func, &arg, 1);
31679  }
31680 #endif
31681 #ifdef __Pyx_CyFunction_USED
31682  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
31683 #else
31684  if (likely(PyCFunction_Check(func))) {
31685 #endif
31686  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
31687  return __Pyx_PyObject_CallMethO(func, arg);
31688 #if CYTHON_FAST_PYCCALL
31689  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
31690  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
31691 #endif
31692  }
31693  }
31694  return __Pyx__PyObject_CallOneArg(func, arg);
31695 }
31696 #else
31697 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
31698  PyObject *result;
31699  PyObject *args = PyTuple_Pack(1, arg);
31700  if (unlikely(!args)) return NULL;
31701  result = __Pyx_PyObject_Call(func, args, NULL);
31702  Py_DECREF(args);
31703  return result;
31704 }
31705 #endif
31706 
31707 /* PyObjectCallNoArg */
31708  #if CYTHON_COMPILING_IN_CPYTHON
31709 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
31710 #if CYTHON_FAST_PYCALL
31711  if (PyFunction_Check(func)) {
31712  return __Pyx_PyFunction_FastCall(func, NULL, 0);
31713  }
31714 #endif
31715 #ifdef __Pyx_CyFunction_USED
31716  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
31717 #else
31718  if (likely(PyCFunction_Check(func))) {
31719 #endif
31720  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
31721  return __Pyx_PyObject_CallMethO(func, NULL);
31722  }
31723  }
31724  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
31725 }
31726 #endif
31727 
31728 /* RaiseTooManyValuesToUnpack */
31729  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
31730  PyErr_Format(PyExc_ValueError,
31731  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
31732 }
31733 
31734 /* RaiseNeedMoreValuesToUnpack */
31735  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
31736  PyErr_Format(PyExc_ValueError,
31737  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
31738  index, (index == 1) ? "" : "s");
31739 }
31740 
31741 /* IterFinish */
31742  static CYTHON_INLINE int __Pyx_IterFinish(void) {
31743 #if CYTHON_FAST_THREAD_STATE
31744  PyThreadState *tstate = PyThreadState_GET();
31745  PyObject* exc_type = tstate->curexc_type;
31746  if (unlikely(exc_type)) {
31747  if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
31748  PyObject *exc_value, *exc_tb;
31749  exc_value = tstate->curexc_value;
31750  exc_tb = tstate->curexc_traceback;
31751  tstate->curexc_type = 0;
31752  tstate->curexc_value = 0;
31753  tstate->curexc_traceback = 0;
31754  Py_DECREF(exc_type);
31755  Py_XDECREF(exc_value);
31756  Py_XDECREF(exc_tb);
31757  return 0;
31758  } else {
31759  return -1;
31760  }
31761  }
31762  return 0;
31763 #else
31764  if (unlikely(PyErr_Occurred())) {
31765  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
31766  PyErr_Clear();
31767  return 0;
31768  } else {
31769  return -1;
31770  }
31771  }
31772  return 0;
31773 #endif
31774 }
31775 
31776 /* UnpackItemEndCheck */
31777  static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
31778  if (unlikely(retval)) {
31779  Py_DECREF(retval);
31780  __Pyx_RaiseTooManyValuesError(expected);
31781  return -1;
31782  } else {
31783  return __Pyx_IterFinish();
31784  }
31785  return 0;
31786 }
31787 
31788 /* ExtTypeTest */
31789  static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
31790  if (unlikely(!type)) {
31791  PyErr_SetString(PyExc_SystemError, "Missing type object");
31792  return 0;
31793  }
31794  if (likely(PyObject_TypeCheck(obj, type)))
31795  return 1;
31796  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
31797  Py_TYPE(obj)->tp_name, type->tp_name);
31798  return 0;
31799 }
31800 
31801 /* GetModuleGlobalName */
31802  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
31803  PyObject *result;
31804 #if !CYTHON_AVOID_BORROWED_REFS
31805  result = PyDict_GetItem(__pyx_d, name);
31806  if (likely(result)) {
31807  Py_INCREF(result);
31808  } else {
31809 #else
31810  result = PyObject_GetItem(__pyx_d, name);
31811  if (!result) {
31812  PyErr_Clear();
31813 #endif
31814  result = __Pyx_GetBuiltinName(name);
31815  }
31816  return result;
31817 }
31818 
31819 /* PyObjectCallMethod1 */
31820  static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
31821  PyObject *method, *result = NULL;
31822  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
31823  if (unlikely(!method)) goto done;
31824 #if CYTHON_UNPACK_METHODS
31825  if (likely(PyMethod_Check(method))) {
31826  PyObject *self = PyMethod_GET_SELF(method);
31827  if (likely(self)) {
31828  PyObject *args;
31829  PyObject *function = PyMethod_GET_FUNCTION(method);
31830  #if CYTHON_FAST_PYCALL
31831  if (PyFunction_Check(function)) {
31832  PyObject *args[2] = {self, arg};
31833  result = __Pyx_PyFunction_FastCall(function, args, 2);
31834  goto done;
31835  }
31836  #endif
31837  #if CYTHON_FAST_PYCCALL
31838  if (__Pyx_PyFastCFunction_Check(function)) {
31839  PyObject *args[2] = {self, arg};
31840  result = __Pyx_PyCFunction_FastCall(function, args, 2);
31841  goto done;
31842  }
31843  #endif
31844  args = PyTuple_New(2);
31845  if (unlikely(!args)) goto done;
31846  Py_INCREF(self);
31847  PyTuple_SET_ITEM(args, 0, self);
31848  Py_INCREF(arg);
31849  PyTuple_SET_ITEM(args, 1, arg);
31850  Py_INCREF(function);
31851  Py_DECREF(method); method = NULL;
31852  result = __Pyx_PyObject_Call(function, args, NULL);
31853  Py_DECREF(args);
31854  Py_DECREF(function);
31855  return result;
31856  }
31857  }
31858 #endif
31859  result = __Pyx_PyObject_CallOneArg(method, arg);
31860 done:
31861  Py_XDECREF(method);
31862  return result;
31863 }
31864 
31865 /* append */
31866  static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
31867  if (likely(PyList_CheckExact(L))) {
31868  if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
31869  } else {
31870  PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
31871  if (unlikely(!retval))
31872  return -1;
31873  Py_DECREF(retval);
31874  }
31875  return 0;
31876 }
31877 
31878 /* PyIntBinop */
31879  #if !CYTHON_COMPILING_IN_PYPY
31880 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
31881  #if PY_MAJOR_VERSION < 3
31882  if (likely(PyInt_CheckExact(op1))) {
31883  const long b = intval;
31884  long x;
31885  long a = PyInt_AS_LONG(op1);
31886  x = (long)((unsigned long)a + b);
31887  if (likely((x^a) >= 0 || (x^b) >= 0))
31888  return PyInt_FromLong(x);
31889  return PyLong_Type.tp_as_number->nb_add(op1, op2);
31890  }
31891  #endif
31892  #if CYTHON_USE_PYLONG_INTERNALS
31893  if (likely(PyLong_CheckExact(op1))) {
31894  const long b = intval;
31895  long a, x;
31896 #ifdef HAVE_LONG_LONG
31897  const PY_LONG_LONG llb = intval;
31898  PY_LONG_LONG lla, llx;
31899 #endif
31900  const digit* digits = ((PyLongObject*)op1)->ob_digit;
31901  const Py_ssize_t size = Py_SIZE(op1);
31902  if (likely(__Pyx_sst_abs(size) <= 1)) {
31903  a = likely(size) ? digits[0] : 0;
31904  if (size == -1) a = -a;
31905  } else {
31906  switch (size) {
31907  case -2:
31908  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31909  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31910  break;
31911 #ifdef HAVE_LONG_LONG
31912  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31913  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31914  goto long_long;
31915 #endif
31916  }
31917  case 2:
31918  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31919  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31920  break;
31921 #ifdef HAVE_LONG_LONG
31922  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31923  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31924  goto long_long;
31925 #endif
31926  }
31927  case -3:
31928  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31929  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31930  break;
31931 #ifdef HAVE_LONG_LONG
31932  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31933  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31934  goto long_long;
31935 #endif
31936  }
31937  case 3:
31938  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31939  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31940  break;
31941 #ifdef HAVE_LONG_LONG
31942  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31943  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31944  goto long_long;
31945 #endif
31946  }
31947  case -4:
31948  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31949  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31950  break;
31951 #ifdef HAVE_LONG_LONG
31952  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31953  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31954  goto long_long;
31955 #endif
31956  }
31957  case 4:
31958  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31959  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31960  break;
31961 #ifdef HAVE_LONG_LONG
31962  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31963  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31964  goto long_long;
31965 #endif
31966  }
31967  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
31968  }
31969  }
31970  x = a + b;
31971  return PyLong_FromLong(x);
31972 #ifdef HAVE_LONG_LONG
31973  long_long:
31974  llx = lla + llb;
31975  return PyLong_FromLongLong(llx);
31976 #endif
31977 
31978 
31979  }
31980  #endif
31981  if (PyFloat_CheckExact(op1)) {
31982  const long b = intval;
31983  double a = PyFloat_AS_DOUBLE(op1);
31984  double result;
31985  PyFPE_START_PROTECT("add", return NULL)
31986  result = ((double)a) + (double)b;
31987  PyFPE_END_PROTECT(result)
31988  return PyFloat_FromDouble(result);
31989  }
31990  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
31991 }
31992 #endif
31993 
31994 /* SliceObject */
31995  static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
31996  Py_ssize_t cstart, Py_ssize_t cstop,
31997  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
31998  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
31999 #if CYTHON_USE_TYPE_SLOTS
32000  PyMappingMethods* mp;
32001 #if PY_MAJOR_VERSION < 3
32002  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
32003  if (likely(ms && ms->sq_ass_slice)) {
32004  if (!has_cstart) {
32005  if (_py_start && (*_py_start != Py_None)) {
32006  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
32007  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32008  } else
32009  cstart = 0;
32010  }
32011  if (!has_cstop) {
32012  if (_py_stop && (*_py_stop != Py_None)) {
32013  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
32014  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32015  } else
32016  cstop = PY_SSIZE_T_MAX;
32017  }
32018  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
32019  Py_ssize_t l = ms->sq_length(obj);
32020  if (likely(l >= 0)) {
32021  if (cstop < 0) {
32022  cstop += l;
32023  if (cstop < 0) cstop = 0;
32024  }
32025  if (cstart < 0) {
32026  cstart += l;
32027  if (cstart < 0) cstart = 0;
32028  }
32029  } else {
32030  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32031  goto bad;
32032  PyErr_Clear();
32033  }
32034  }
32035  return ms->sq_ass_slice(obj, cstart, cstop, value);
32036  }
32037 #endif
32038  mp = Py_TYPE(obj)->tp_as_mapping;
32039  if (likely(mp && mp->mp_ass_subscript))
32040 #endif
32041  {
32042  int result;
32043  PyObject *py_slice, *py_start, *py_stop;
32044  if (_py_slice) {
32045  py_slice = *_py_slice;
32046  } else {
32047  PyObject* owned_start = NULL;
32048  PyObject* owned_stop = NULL;
32049  if (_py_start) {
32050  py_start = *_py_start;
32051  } else {
32052  if (has_cstart) {
32053  owned_start = py_start = PyInt_FromSsize_t(cstart);
32054  if (unlikely(!py_start)) goto bad;
32055  } else
32056  py_start = Py_None;
32057  }
32058  if (_py_stop) {
32059  py_stop = *_py_stop;
32060  } else {
32061  if (has_cstop) {
32062  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
32063  if (unlikely(!py_stop)) {
32064  Py_XDECREF(owned_start);
32065  goto bad;
32066  }
32067  } else
32068  py_stop = Py_None;
32069  }
32070  py_slice = PySlice_New(py_start, py_stop, Py_None);
32071  Py_XDECREF(owned_start);
32072  Py_XDECREF(owned_stop);
32073  if (unlikely(!py_slice)) goto bad;
32074  }
32075 #if CYTHON_USE_TYPE_SLOTS
32076  result = mp->mp_ass_subscript(obj, py_slice, value);
32077 #else
32078  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
32079 #endif
32080  if (!_py_slice) {
32081  Py_DECREF(py_slice);
32082  }
32083  return result;
32084  }
32085  PyErr_Format(PyExc_TypeError,
32086  "'%.200s' object does not support slice %.10s",
32087  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
32088 bad:
32089  return -1;
32090 }
32091 
32092 /* GetItemInt */
32093  static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
32094  PyObject *r;
32095  if (!j) return NULL;
32096  r = PyObject_GetItem(o, j);
32097  Py_DECREF(j);
32098  return r;
32099 }
32100 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
32101  CYTHON_NCP_UNUSED int wraparound,
32102  CYTHON_NCP_UNUSED int boundscheck) {
32103 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32104  if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
32105  if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
32106  PyObject *r = PyList_GET_ITEM(o, i);
32107  Py_INCREF(r);
32108  return r;
32109  }
32110  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32111 #else
32112  return PySequence_GetItem(o, i);
32113 #endif
32114 }
32115 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
32116  CYTHON_NCP_UNUSED int wraparound,
32117  CYTHON_NCP_UNUSED int boundscheck) {
32118 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32119  if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
32120  if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
32121  PyObject *r = PyTuple_GET_ITEM(o, i);
32122  Py_INCREF(r);
32123  return r;
32124  }
32125  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32126 #else
32127  return PySequence_GetItem(o, i);
32128 #endif
32129 }
32130 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
32131  CYTHON_NCP_UNUSED int wraparound,
32132  CYTHON_NCP_UNUSED int boundscheck) {
32133 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
32134  if (is_list || PyList_CheckExact(o)) {
32135  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
32136  if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
32137  PyObject *r = PyList_GET_ITEM(o, n);
32138  Py_INCREF(r);
32139  return r;
32140  }
32141  }
32142  else if (PyTuple_CheckExact(o)) {
32143  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
32144  if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
32145  PyObject *r = PyTuple_GET_ITEM(o, n);
32146  Py_INCREF(r);
32147  return r;
32148  }
32149  } else {
32150  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
32151  if (likely(m && m->sq_item)) {
32152  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
32153  Py_ssize_t l = m->sq_length(o);
32154  if (likely(l >= 0)) {
32155  i += l;
32156  } else {
32157  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32158  return NULL;
32159  PyErr_Clear();
32160  }
32161  }
32162  return m->sq_item(o, i);
32163  }
32164  }
32165 #else
32166  if (is_list || PySequence_Check(o)) {
32167  return PySequence_GetItem(o, i);
32168  }
32169 #endif
32170  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
32171 }
32172 
32173 /* SliceObject */
32174  static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
32175  Py_ssize_t cstart, Py_ssize_t cstop,
32176  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
32177  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
32178 #if CYTHON_USE_TYPE_SLOTS
32179  PyMappingMethods* mp;
32180 #if PY_MAJOR_VERSION < 3
32181  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
32182  if (likely(ms && ms->sq_slice)) {
32183  if (!has_cstart) {
32184  if (_py_start && (*_py_start != Py_None)) {
32185  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
32186  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32187  } else
32188  cstart = 0;
32189  }
32190  if (!has_cstop) {
32191  if (_py_stop && (*_py_stop != Py_None)) {
32192  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
32193  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
32194  } else
32195  cstop = PY_SSIZE_T_MAX;
32196  }
32197  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
32198  Py_ssize_t l = ms->sq_length(obj);
32199  if (likely(l >= 0)) {
32200  if (cstop < 0) {
32201  cstop += l;
32202  if (cstop < 0) cstop = 0;
32203  }
32204  if (cstart < 0) {
32205  cstart += l;
32206  if (cstart < 0) cstart = 0;
32207  }
32208  } else {
32209  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
32210  goto bad;
32211  PyErr_Clear();
32212  }
32213  }
32214  return ms->sq_slice(obj, cstart, cstop);
32215  }
32216 #endif
32217  mp = Py_TYPE(obj)->tp_as_mapping;
32218  if (likely(mp && mp->mp_subscript))
32219 #endif
32220  {
32221  PyObject* result;
32222  PyObject *py_slice, *py_start, *py_stop;
32223  if (_py_slice) {
32224  py_slice = *_py_slice;
32225  } else {
32226  PyObject* owned_start = NULL;
32227  PyObject* owned_stop = NULL;
32228  if (_py_start) {
32229  py_start = *_py_start;
32230  } else {
32231  if (has_cstart) {
32232  owned_start = py_start = PyInt_FromSsize_t(cstart);
32233  if (unlikely(!py_start)) goto bad;
32234  } else
32235  py_start = Py_None;
32236  }
32237  if (_py_stop) {
32238  py_stop = *_py_stop;
32239  } else {
32240  if (has_cstop) {
32241  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
32242  if (unlikely(!py_stop)) {
32243  Py_XDECREF(owned_start);
32244  goto bad;
32245  }
32246  } else
32247  py_stop = Py_None;
32248  }
32249  py_slice = PySlice_New(py_start, py_stop, Py_None);
32250  Py_XDECREF(owned_start);
32251  Py_XDECREF(owned_stop);
32252  if (unlikely(!py_slice)) goto bad;
32253  }
32254 #if CYTHON_USE_TYPE_SLOTS
32255  result = mp->mp_subscript(obj, py_slice);
32256 #else
32257  result = PyObject_GetItem(obj, py_slice);
32258 #endif
32259  if (!_py_slice) {
32260  Py_DECREF(py_slice);
32261  }
32262  return result;
32263  }
32264  PyErr_Format(PyExc_TypeError,
32265  "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
32266 bad:
32267  return NULL;
32268 }
32269 
32270 /* Import */
32271  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
32272  PyObject *empty_list = 0;
32273  PyObject *module = 0;
32274  PyObject *global_dict = 0;
32275  PyObject *empty_dict = 0;
32276  PyObject *list;
32277  #if PY_VERSION_HEX < 0x03030000
32278  PyObject *py_import;
32279  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
32280  if (!py_import)
32281  goto bad;
32282  #endif
32283  if (from_list)
32284  list = from_list;
32285  else {
32286  empty_list = PyList_New(0);
32287  if (!empty_list)
32288  goto bad;
32289  list = empty_list;
32290  }
32291  global_dict = PyModule_GetDict(__pyx_m);
32292  if (!global_dict)
32293  goto bad;
32294  empty_dict = PyDict_New();
32295  if (!empty_dict)
32296  goto bad;
32297  {
32298  #if PY_MAJOR_VERSION >= 3
32299  if (level == -1) {
32300  if (strchr(__Pyx_MODULE_NAME, '.')) {
32301  #if PY_VERSION_HEX < 0x03030000
32302  PyObject *py_level = PyInt_FromLong(1);
32303  if (!py_level)
32304  goto bad;
32305  module = PyObject_CallFunctionObjArgs(py_import,
32306  name, global_dict, empty_dict, list, py_level, NULL);
32307  Py_DECREF(py_level);
32308  #else
32309  module = PyImport_ImportModuleLevelObject(
32310  name, global_dict, empty_dict, list, 1);
32311  #endif
32312  if (!module) {
32313  if (!PyErr_ExceptionMatches(PyExc_ImportError))
32314  goto bad;
32315  PyErr_Clear();
32316  }
32317  }
32318  level = 0;
32319  }
32320  #endif
32321  if (!module) {
32322  #if PY_VERSION_HEX < 0x03030000
32323  PyObject *py_level = PyInt_FromLong(level);
32324  if (!py_level)
32325  goto bad;
32326  module = PyObject_CallFunctionObjArgs(py_import,
32327  name, global_dict, empty_dict, list, py_level, NULL);
32328  Py_DECREF(py_level);
32329  #else
32330  module = PyImport_ImportModuleLevelObject(
32331  name, global_dict, empty_dict, list, level);
32332  #endif
32333  }
32334  }
32335 bad:
32336  #if PY_VERSION_HEX < 0x03030000
32337  Py_XDECREF(py_import);
32338  #endif
32339  Py_XDECREF(empty_list);
32340  Py_XDECREF(empty_dict);
32341  return module;
32342 }
32343 
32344 /* ImportFrom */
32345  static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
32346  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
32347  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
32348  PyErr_Format(PyExc_ImportError,
32349  #if PY_MAJOR_VERSION < 3
32350  "cannot import name %.230s", PyString_AS_STRING(name));
32351  #else
32352  "cannot import name %S", name);
32353  #endif
32354  }
32355  return value;
32356 }
32357 
32358 /* BytesEquals */
32359  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
32360 #if CYTHON_COMPILING_IN_PYPY
32361  return PyObject_RichCompareBool(s1, s2, equals);
32362 #else
32363  if (s1 == s2) {
32364  return (equals == Py_EQ);
32365  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
32366  const char *ps1, *ps2;
32367  Py_ssize_t length = PyBytes_GET_SIZE(s1);
32368  if (length != PyBytes_GET_SIZE(s2))
32369  return (equals == Py_NE);
32370  ps1 = PyBytes_AS_STRING(s1);
32371  ps2 = PyBytes_AS_STRING(s2);
32372  if (ps1[0] != ps2[0]) {
32373  return (equals == Py_NE);
32374  } else if (length == 1) {
32375  return (equals == Py_EQ);
32376  } else {
32377  int result = memcmp(ps1, ps2, (size_t)length);
32378  return (equals == Py_EQ) ? (result == 0) : (result != 0);
32379  }
32380  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
32381  return (equals == Py_NE);
32382  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
32383  return (equals == Py_NE);
32384  } else {
32385  int result;
32386  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
32387  if (!py_result)
32388  return -1;
32389  result = __Pyx_PyObject_IsTrue(py_result);
32390  Py_DECREF(py_result);
32391  return result;
32392  }
32393 #endif
32394 }
32395 
32396 /* UnicodeEquals */
32397  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
32398 #if CYTHON_COMPILING_IN_PYPY
32399  return PyObject_RichCompareBool(s1, s2, equals);
32400 #else
32401 #if PY_MAJOR_VERSION < 3
32402  PyObject* owned_ref = NULL;
32403 #endif
32404  int s1_is_unicode, s2_is_unicode;
32405  if (s1 == s2) {
32406  goto return_eq;
32407  }
32408  s1_is_unicode = PyUnicode_CheckExact(s1);
32409  s2_is_unicode = PyUnicode_CheckExact(s2);
32410 #if PY_MAJOR_VERSION < 3
32411  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
32412  owned_ref = PyUnicode_FromObject(s2);
32413  if (unlikely(!owned_ref))
32414  return -1;
32415  s2 = owned_ref;
32416  s2_is_unicode = 1;
32417  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
32418  owned_ref = PyUnicode_FromObject(s1);
32419  if (unlikely(!owned_ref))
32420  return -1;
32421  s1 = owned_ref;
32422  s1_is_unicode = 1;
32423  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
32424  return __Pyx_PyBytes_Equals(s1, s2, equals);
32425  }
32426 #endif
32427  if (s1_is_unicode & s2_is_unicode) {
32428  Py_ssize_t length;
32429  int kind;
32430  void *data1, *data2;
32431  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
32432  return -1;
32433  length = __Pyx_PyUnicode_GET_LENGTH(s1);
32434  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
32435  goto return_ne;
32436  }
32437  kind = __Pyx_PyUnicode_KIND(s1);
32438  if (kind != __Pyx_PyUnicode_KIND(s2)) {
32439  goto return_ne;
32440  }
32441  data1 = __Pyx_PyUnicode_DATA(s1);
32442  data2 = __Pyx_PyUnicode_DATA(s2);
32443  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
32444  goto return_ne;
32445  } else if (length == 1) {
32446  goto return_eq;
32447  } else {
32448  int result = memcmp(data1, data2, (size_t)(length * kind));
32449  #if PY_MAJOR_VERSION < 3
32450  Py_XDECREF(owned_ref);
32451  #endif
32452  return (equals == Py_EQ) ? (result == 0) : (result != 0);
32453  }
32454  } else if ((s1 == Py_None) & s2_is_unicode) {
32455  goto return_ne;
32456  } else if ((s2 == Py_None) & s1_is_unicode) {
32457  goto return_ne;
32458  } else {
32459  int result;
32460  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
32461  if (!py_result)
32462  return -1;
32463  result = __Pyx_PyObject_IsTrue(py_result);
32464  Py_DECREF(py_result);
32465  return result;
32466  }
32467 return_eq:
32468  #if PY_MAJOR_VERSION < 3
32469  Py_XDECREF(owned_ref);
32470  #endif
32471  return (equals == Py_EQ);
32472 return_ne:
32473  #if PY_MAJOR_VERSION < 3
32474  Py_XDECREF(owned_ref);
32475  #endif
32476  return (equals == Py_NE);
32477 #endif
32478 }
32479 
32480 /* PyIntBinop */
32481  #if !CYTHON_COMPILING_IN_PYPY
32482 static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
32483  if (op1 == op2) {
32484  Py_RETURN_TRUE;
32485  }
32486  #if PY_MAJOR_VERSION < 3
32487  if (likely(PyInt_CheckExact(op1))) {
32488  const long b = intval;
32489  long a = PyInt_AS_LONG(op1);
32490  if (a == b) {
32491  Py_RETURN_TRUE;
32492  } else {
32493  Py_RETURN_FALSE;
32494  }
32495  }
32496  #endif
32497  #if CYTHON_USE_PYLONG_INTERNALS
32498  if (likely(PyLong_CheckExact(op1))) {
32499  const long b = intval;
32500  long a;
32501  const digit* digits = ((PyLongObject*)op1)->ob_digit;
32502  const Py_ssize_t size = Py_SIZE(op1);
32503  if (likely(__Pyx_sst_abs(size) <= 1)) {
32504  a = likely(size) ? digits[0] : 0;
32505  if (size == -1) a = -a;
32506  } else {
32507  switch (size) {
32508  case -2:
32509  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
32510  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32511  break;
32512  }
32513  case 2:
32514  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
32515  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32516  break;
32517  }
32518  case -3:
32519  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
32520  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32521  break;
32522  }
32523  case 3:
32524  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
32525  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32526  break;
32527  }
32528  case -4:
32529  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
32530  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32531  break;
32532  }
32533  case 4:
32534  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
32535  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
32536  break;
32537  }
32538  #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
32539  default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
32540  #else
32541  default: Py_RETURN_FALSE;
32542  #endif
32543  }
32544  }
32545  if (a == b) {
32546  Py_RETURN_TRUE;
32547  } else {
32548  Py_RETURN_FALSE;
32549  }
32550  }
32551  #endif
32552  if (PyFloat_CheckExact(op1)) {
32553  const long b = intval;
32554  double a = PyFloat_AS_DOUBLE(op1);
32555  if ((double)a == (double)b) {
32556  Py_RETURN_TRUE;
32557  } else {
32558  Py_RETURN_FALSE;
32559  }
32560  }
32561  return PyObject_RichCompare(op1, op2, Py_EQ);
32562 }
32563 #endif
32564 
32565 /* PyObjectCallMethod0 */
32566  static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
32567  PyObject *method, *result = NULL;
32568  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
32569  if (unlikely(!method)) goto bad;
32570 #if CYTHON_UNPACK_METHODS
32571  if (likely(PyMethod_Check(method))) {
32572  PyObject *self = PyMethod_GET_SELF(method);
32573  if (likely(self)) {
32574  PyObject *function = PyMethod_GET_FUNCTION(method);
32575  result = __Pyx_PyObject_CallOneArg(function, self);
32576  Py_DECREF(method);
32577  return result;
32578  }
32579  }
32580 #endif
32581  result = __Pyx_PyObject_CallNoArg(method);
32582  Py_DECREF(method);
32583 bad:
32584  return result;
32585 }
32586 
32587 /* RaiseNoneIterError */
32588  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
32589  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
32590 }
32591 
32592 /* UnpackTupleError */
32593  static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
32594  if (t == Py_None) {
32595  __Pyx_RaiseNoneNotIterableError();
32596  } else if (PyTuple_GET_SIZE(t) < index) {
32597  __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
32598  } else {
32599  __Pyx_RaiseTooManyValuesError(index);
32600  }
32601 }
32602 
32603 /* UnpackTuple2 */
32604  static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
32605  int is_tuple, int has_known_size, int decref_tuple) {
32606  Py_ssize_t index;
32607  PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
32608  if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
32609  iternextfunc iternext;
32610  iter = PyObject_GetIter(tuple);
32611  if (unlikely(!iter)) goto bad;
32612  if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
32613  iternext = Py_TYPE(iter)->tp_iternext;
32614  value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
32615  value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
32616  if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
32617  Py_DECREF(iter);
32618  } else {
32619  if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
32620  __Pyx_UnpackTupleError(tuple, 2);
32621  goto bad;
32622  }
32623 #if CYTHON_COMPILING_IN_PYPY
32624  value1 = PySequence_ITEM(tuple, 0);
32625  if (unlikely(!value1)) goto bad;
32626  value2 = PySequence_ITEM(tuple, 1);
32627  if (unlikely(!value2)) goto bad;
32628 #else
32629  value1 = PyTuple_GET_ITEM(tuple, 0);
32630  value2 = PyTuple_GET_ITEM(tuple, 1);
32631  Py_INCREF(value1);
32632  Py_INCREF(value2);
32633 #endif
32634  if (decref_tuple) { Py_DECREF(tuple); }
32635  }
32636  *pvalue1 = value1;
32637  *pvalue2 = value2;
32638  return 0;
32639 unpacking_failed:
32640  if (!has_known_size && __Pyx_IterFinish() == 0)
32641  __Pyx_RaiseNeedMoreValuesError(index);
32642 bad:
32643  Py_XDECREF(iter);
32644  Py_XDECREF(value1);
32645  Py_XDECREF(value2);
32646  if (decref_tuple) { Py_XDECREF(tuple); }
32647  return -1;
32648 }
32649 
32650 /* dict_iter */
32651  static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
32652  Py_ssize_t* p_orig_length, int* p_source_is_dict) {
32653  is_dict = is_dict || likely(PyDict_CheckExact(iterable));
32654  *p_source_is_dict = is_dict;
32655 #if !CYTHON_COMPILING_IN_PYPY
32656  if (is_dict) {
32657  *p_orig_length = PyDict_Size(iterable);
32658  Py_INCREF(iterable);
32659  return iterable;
32660  }
32661 #endif
32662  *p_orig_length = 0;
32663  if (method_name) {
32664  PyObject* iter;
32665  iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
32666  if (!iterable)
32667  return NULL;
32668 #if !CYTHON_COMPILING_IN_PYPY
32669  if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
32670  return iterable;
32671 #endif
32672  iter = PyObject_GetIter(iterable);
32673  Py_DECREF(iterable);
32674  return iter;
32675  }
32676  return PyObject_GetIter(iterable);
32677 }
32678 static CYTHON_INLINE int __Pyx_dict_iter_next(
32679  PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
32680  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
32681  PyObject* next_item;
32682 #if !CYTHON_COMPILING_IN_PYPY
32683  if (source_is_dict) {
32684  PyObject *key, *value;
32685  if (unlikely(orig_length != PyDict_Size(iter_obj))) {
32686  PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
32687  return -1;
32688  }
32689  if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
32690  return 0;
32691  }
32692  if (pitem) {
32693  PyObject* tuple = PyTuple_New(2);
32694  if (unlikely(!tuple)) {
32695  return -1;
32696  }
32697  Py_INCREF(key);
32698  Py_INCREF(value);
32699  PyTuple_SET_ITEM(tuple, 0, key);
32700  PyTuple_SET_ITEM(tuple, 1, value);
32701  *pitem = tuple;
32702  } else {
32703  if (pkey) {
32704  Py_INCREF(key);
32705  *pkey = key;
32706  }
32707  if (pvalue) {
32708  Py_INCREF(value);
32709  *pvalue = value;
32710  }
32711  }
32712  return 1;
32713  } else if (PyTuple_CheckExact(iter_obj)) {
32714  Py_ssize_t pos = *ppos;
32715  if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
32716  *ppos = pos + 1;
32717  next_item = PyTuple_GET_ITEM(iter_obj, pos);
32718  Py_INCREF(next_item);
32719  } else if (PyList_CheckExact(iter_obj)) {
32720  Py_ssize_t pos = *ppos;
32721  if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
32722  *ppos = pos + 1;
32723  next_item = PyList_GET_ITEM(iter_obj, pos);
32724  Py_INCREF(next_item);
32725  } else
32726 #endif
32727  {
32728  next_item = PyIter_Next(iter_obj);
32729  if (unlikely(!next_item)) {
32730  return __Pyx_IterFinish();
32731  }
32732  }
32733  if (pitem) {
32734  *pitem = next_item;
32735  } else if (pkey && pvalue) {
32736  if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
32737  return -1;
32738  } else if (pkey) {
32739  *pkey = next_item;
32740  } else {
32741  *pvalue = next_item;
32742  }
32743  return 1;
32744 }
32745 
32746 /* PyErrFetchRestore */
32747  #if CYTHON_FAST_THREAD_STATE
32748 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
32749  PyObject *tmp_type, *tmp_value, *tmp_tb;
32750  tmp_type = tstate->curexc_type;
32751  tmp_value = tstate->curexc_value;
32752  tmp_tb = tstate->curexc_traceback;
32753  tstate->curexc_type = type;
32754  tstate->curexc_value = value;
32755  tstate->curexc_traceback = tb;
32756  Py_XDECREF(tmp_type);
32757  Py_XDECREF(tmp_value);
32758  Py_XDECREF(tmp_tb);
32759 }
32760 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32761  *type = tstate->curexc_type;
32762  *value = tstate->curexc_value;
32763  *tb = tstate->curexc_traceback;
32764  tstate->curexc_type = 0;
32765  tstate->curexc_value = 0;
32766  tstate->curexc_traceback = 0;
32767 }
32768 #endif
32769 
32770 /* RaiseException */
32771  #if PY_MAJOR_VERSION < 3
32772 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
32773  CYTHON_UNUSED PyObject *cause) {
32774  __Pyx_PyThreadState_declare
32775  Py_XINCREF(type);
32776  if (!value || value == Py_None)
32777  value = NULL;
32778  else
32779  Py_INCREF(value);
32780  if (!tb || tb == Py_None)
32781  tb = NULL;
32782  else {
32783  Py_INCREF(tb);
32784  if (!PyTraceBack_Check(tb)) {
32785  PyErr_SetString(PyExc_TypeError,
32786  "raise: arg 3 must be a traceback or None");
32787  goto raise_error;
32788  }
32789  }
32790  if (PyType_Check(type)) {
32791 #if CYTHON_COMPILING_IN_PYPY
32792  if (!value) {
32793  Py_INCREF(Py_None);
32794  value = Py_None;
32795  }
32796 #endif
32797  PyErr_NormalizeException(&type, &value, &tb);
32798  } else {
32799  if (value) {
32800  PyErr_SetString(PyExc_TypeError,
32801  "instance exception may not have a separate value");
32802  goto raise_error;
32803  }
32804  value = type;
32805  type = (PyObject*) Py_TYPE(type);
32806  Py_INCREF(type);
32807  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
32808  PyErr_SetString(PyExc_TypeError,
32809  "raise: exception class must be a subclass of BaseException");
32810  goto raise_error;
32811  }
32812  }
32813  __Pyx_PyThreadState_assign
32814  __Pyx_ErrRestore(type, value, tb);
32815  return;
32816 raise_error:
32817  Py_XDECREF(value);
32818  Py_XDECREF(type);
32819  Py_XDECREF(tb);
32820  return;
32821 }
32822 #else
32823 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
32824  PyObject* owned_instance = NULL;
32825  if (tb == Py_None) {
32826  tb = 0;
32827  } else if (tb && !PyTraceBack_Check(tb)) {
32828  PyErr_SetString(PyExc_TypeError,
32829  "raise: arg 3 must be a traceback or None");
32830  goto bad;
32831  }
32832  if (value == Py_None)
32833  value = 0;
32834  if (PyExceptionInstance_Check(type)) {
32835  if (value) {
32836  PyErr_SetString(PyExc_TypeError,
32837  "instance exception may not have a separate value");
32838  goto bad;
32839  }
32840  value = type;
32841  type = (PyObject*) Py_TYPE(value);
32842  } else if (PyExceptionClass_Check(type)) {
32843  PyObject *instance_class = NULL;
32844  if (value && PyExceptionInstance_Check(value)) {
32845  instance_class = (PyObject*) Py_TYPE(value);
32846  if (instance_class != type) {
32847  int is_subclass = PyObject_IsSubclass(instance_class, type);
32848  if (!is_subclass) {
32849  instance_class = NULL;
32850  } else if (unlikely(is_subclass == -1)) {
32851  goto bad;
32852  } else {
32853  type = instance_class;
32854  }
32855  }
32856  }
32857  if (!instance_class) {
32858  PyObject *args;
32859  if (!value)
32860  args = PyTuple_New(0);
32861  else if (PyTuple_Check(value)) {
32862  Py_INCREF(value);
32863  args = value;
32864  } else
32865  args = PyTuple_Pack(1, value);
32866  if (!args)
32867  goto bad;
32868  owned_instance = PyObject_Call(type, args, NULL);
32869  Py_DECREF(args);
32870  if (!owned_instance)
32871  goto bad;
32872  value = owned_instance;
32873  if (!PyExceptionInstance_Check(value)) {
32874  PyErr_Format(PyExc_TypeError,
32875  "calling %R should have returned an instance of "
32876  "BaseException, not %R",
32877  type, Py_TYPE(value));
32878  goto bad;
32879  }
32880  }
32881  } else {
32882  PyErr_SetString(PyExc_TypeError,
32883  "raise: exception class must be a subclass of BaseException");
32884  goto bad;
32885  }
32886 #if PY_VERSION_HEX >= 0x03030000
32887  if (cause) {
32888 #else
32889  if (cause && cause != Py_None) {
32890 #endif
32891  PyObject *fixed_cause;
32892  if (cause == Py_None) {
32893  fixed_cause = NULL;
32894  } else if (PyExceptionClass_Check(cause)) {
32895  fixed_cause = PyObject_CallObject(cause, NULL);
32896  if (fixed_cause == NULL)
32897  goto bad;
32898  } else if (PyExceptionInstance_Check(cause)) {
32899  fixed_cause = cause;
32900  Py_INCREF(fixed_cause);
32901  } else {
32902  PyErr_SetString(PyExc_TypeError,
32903  "exception causes must derive from "
32904  "BaseException");
32905  goto bad;
32906  }
32907  PyException_SetCause(value, fixed_cause);
32908  }
32909  PyErr_SetObject(type, value);
32910  if (tb) {
32911 #if CYTHON_COMPILING_IN_PYPY
32912  PyObject *tmp_type, *tmp_value, *tmp_tb;
32913  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
32914  Py_INCREF(tb);
32915  PyErr_Restore(tmp_type, tmp_value, tb);
32916  Py_XDECREF(tmp_tb);
32917 #else
32918  PyThreadState *tstate = PyThreadState_GET();
32919  PyObject* tmp_tb = tstate->curexc_traceback;
32920  if (tb != tmp_tb) {
32921  Py_INCREF(tb);
32922  tstate->curexc_traceback = tb;
32923  Py_XDECREF(tmp_tb);
32924  }
32925 #endif
32926  }
32927 bad:
32928  Py_XDECREF(owned_instance);
32929  return;
32930 }
32931 #endif
32932 
32933 /* SaveResetException */
32934  #if CYTHON_FAST_THREAD_STATE
32935 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32936  *type = tstate->exc_type;
32937  *value = tstate->exc_value;
32938  *tb = tstate->exc_traceback;
32939  Py_XINCREF(*type);
32940  Py_XINCREF(*value);
32941  Py_XINCREF(*tb);
32942 }
32943 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
32944  PyObject *tmp_type, *tmp_value, *tmp_tb;
32945  tmp_type = tstate->exc_type;
32946  tmp_value = tstate->exc_value;
32947  tmp_tb = tstate->exc_traceback;
32948  tstate->exc_type = type;
32949  tstate->exc_value = value;
32950  tstate->exc_traceback = tb;
32951  Py_XDECREF(tmp_type);
32952  Py_XDECREF(tmp_value);
32953  Py_XDECREF(tmp_tb);
32954 }
32955 #endif
32956 
32957 /* PyErrExceptionMatches */
32958  #if CYTHON_FAST_THREAD_STATE
32959 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
32960  PyObject *exc_type = tstate->curexc_type;
32961  if (exc_type == err) return 1;
32962  if (unlikely(!exc_type)) return 0;
32963  return PyErr_GivenExceptionMatches(exc_type, err);
32964 }
32965 #endif
32966 
32967 /* GetException */
32968  #if CYTHON_FAST_THREAD_STATE
32969 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
32970 #else
32971 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
32972 #endif
32973  PyObject *local_type, *local_value, *local_tb;
32974 #if CYTHON_FAST_THREAD_STATE
32975  PyObject *tmp_type, *tmp_value, *tmp_tb;
32976  local_type = tstate->curexc_type;
32977  local_value = tstate->curexc_value;
32978  local_tb = tstate->curexc_traceback;
32979  tstate->curexc_type = 0;
32980  tstate->curexc_value = 0;
32981  tstate->curexc_traceback = 0;
32982 #else
32983  PyErr_Fetch(&local_type, &local_value, &local_tb);
32984 #endif
32985  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
32986 #if CYTHON_FAST_THREAD_STATE
32987  if (unlikely(tstate->curexc_type))
32988 #else
32989  if (unlikely(PyErr_Occurred()))
32990 #endif
32991  goto bad;
32992  #if PY_MAJOR_VERSION >= 3
32993  if (local_tb) {
32994  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
32995  goto bad;
32996  }
32997  #endif
32998  Py_XINCREF(local_tb);
32999  Py_XINCREF(local_type);
33000  Py_XINCREF(local_value);
33001  *type = local_type;
33002  *value = local_value;
33003  *tb = local_tb;
33004 #if CYTHON_FAST_THREAD_STATE
33005  tmp_type = tstate->exc_type;
33006  tmp_value = tstate->exc_value;
33007  tmp_tb = tstate->exc_traceback;
33008  tstate->exc_type = local_type;
33009  tstate->exc_value = local_value;
33010  tstate->exc_traceback = local_tb;
33011  Py_XDECREF(tmp_type);
33012  Py_XDECREF(tmp_value);
33013  Py_XDECREF(tmp_tb);
33014 #else
33015  PyErr_SetExcInfo(local_type, local_value, local_tb);
33016 #endif
33017  return 0;
33018 bad:
33019  *type = 0;
33020  *value = 0;
33021  *tb = 0;
33022  Py_XDECREF(local_type);
33023  Py_XDECREF(local_value);
33024  Py_XDECREF(local_tb);
33025  return -1;
33026 }
33027 
33028 /* CalculateMetaclass */
33029  static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
33030  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
33031  for (i=0; i < nbases; i++) {
33032  PyTypeObject *tmptype;
33033  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
33034  tmptype = Py_TYPE(tmp);
33035 #if PY_MAJOR_VERSION < 3
33036  if (tmptype == &PyClass_Type)
33037  continue;
33038 #endif
33039  if (!metaclass) {
33040  metaclass = tmptype;
33041  continue;
33042  }
33043  if (PyType_IsSubtype(metaclass, tmptype))
33044  continue;
33045  if (PyType_IsSubtype(tmptype, metaclass)) {
33046  metaclass = tmptype;
33047  continue;
33048  }
33049  PyErr_SetString(PyExc_TypeError,
33050  "metaclass conflict: "
33051  "the metaclass of a derived class "
33052  "must be a (non-strict) subclass "
33053  "of the metaclasses of all its bases");
33054  return NULL;
33055  }
33056  if (!metaclass) {
33057 #if PY_MAJOR_VERSION < 3
33058  metaclass = &PyClass_Type;
33059 #else
33060  metaclass = &PyType_Type;
33061 #endif
33062  }
33063  Py_INCREF((PyObject*) metaclass);
33064  return (PyObject*) metaclass;
33065 }
33066 
33067 /* FetchCommonType */
33068  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
33069  PyObject* fake_module;
33070  PyTypeObject* cached_type = NULL;
33071  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
33072  if (!fake_module) return NULL;
33073  Py_INCREF(fake_module);
33074  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
33075  if (cached_type) {
33076  if (!PyType_Check((PyObject*)cached_type)) {
33077  PyErr_Format(PyExc_TypeError,
33078  "Shared Cython type %.200s is not a type object",
33079  type->tp_name);
33080  goto bad;
33081  }
33082  if (cached_type->tp_basicsize != type->tp_basicsize) {
33083  PyErr_Format(PyExc_TypeError,
33084  "Shared Cython type %.200s has the wrong size, try recompiling",
33085  type->tp_name);
33086  goto bad;
33087  }
33088  } else {
33089  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
33090  PyErr_Clear();
33091  if (PyType_Ready(type) < 0) goto bad;
33092  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
33093  goto bad;
33094  Py_INCREF(type);
33095  cached_type = type;
33096  }
33097 done:
33098  Py_DECREF(fake_module);
33099  return cached_type;
33100 bad:
33101  Py_XDECREF(cached_type);
33102  cached_type = NULL;
33103  goto done;
33104 }
33105 
33106 /* CythonFunction */
33107  static PyObject *
33108 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
33109 {
33110  if (unlikely(op->func_doc == NULL)) {
33111  if (op->func.m_ml->ml_doc) {
33112 #if PY_MAJOR_VERSION >= 3
33113  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
33114 #else
33115  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
33116 #endif
33117  if (unlikely(op->func_doc == NULL))
33118  return NULL;
33119  } else {
33120  Py_INCREF(Py_None);
33121  return Py_None;
33122  }
33123  }
33124  Py_INCREF(op->func_doc);
33125  return op->func_doc;
33126 }
33127 static int
33128 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
33129 {
33130  PyObject *tmp = op->func_doc;
33131  if (value == NULL) {
33132  value = Py_None;
33133  }
33134  Py_INCREF(value);
33135  op->func_doc = value;
33136  Py_XDECREF(tmp);
33137  return 0;
33138 }
33139 static PyObject *
33140 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
33141 {
33142  if (unlikely(op->func_name == NULL)) {
33143 #if PY_MAJOR_VERSION >= 3
33144  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
33145 #else
33146  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
33147 #endif
33148  if (unlikely(op->func_name == NULL))
33149  return NULL;
33150  }
33151  Py_INCREF(op->func_name);
33152  return op->func_name;
33153 }
33154 static int
33155 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
33156 {
33157  PyObject *tmp;
33158 #if PY_MAJOR_VERSION >= 3
33159  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
33160 #else
33161  if (unlikely(value == NULL || !PyString_Check(value))) {
33162 #endif
33163  PyErr_SetString(PyExc_TypeError,
33164  "__name__ must be set to a string object");
33165  return -1;
33166  }
33167  tmp = op->func_name;
33168  Py_INCREF(value);
33169  op->func_name = value;
33170  Py_XDECREF(tmp);
33171  return 0;
33172 }
33173 static PyObject *
33174 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
33175 {
33176  Py_INCREF(op->func_qualname);
33177  return op->func_qualname;
33178 }
33179 static int
33180 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
33181 {
33182  PyObject *tmp;
33183 #if PY_MAJOR_VERSION >= 3
33184  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
33185 #else
33186  if (unlikely(value == NULL || !PyString_Check(value))) {
33187 #endif
33188  PyErr_SetString(PyExc_TypeError,
33189  "__qualname__ must be set to a string object");
33190  return -1;
33191  }
33192  tmp = op->func_qualname;
33193  Py_INCREF(value);
33194  op->func_qualname = value;
33195  Py_XDECREF(tmp);
33196  return 0;
33197 }
33198 static PyObject *
33199 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
33200 {
33201  PyObject *self;
33202  self = m->func_closure;
33203  if (self == NULL)
33204  self = Py_None;
33205  Py_INCREF(self);
33206  return self;
33207 }
33208 static PyObject *
33209 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
33210 {
33211  if (unlikely(op->func_dict == NULL)) {
33212  op->func_dict = PyDict_New();
33213  if (unlikely(op->func_dict == NULL))
33214  return NULL;
33215  }
33216  Py_INCREF(op->func_dict);
33217  return op->func_dict;
33218 }
33219 static int
33220 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
33221 {
33222  PyObject *tmp;
33223  if (unlikely(value == NULL)) {
33224  PyErr_SetString(PyExc_TypeError,
33225  "function's dictionary may not be deleted");
33226  return -1;
33227  }
33228  if (unlikely(!PyDict_Check(value))) {
33229  PyErr_SetString(PyExc_TypeError,
33230  "setting function's dictionary to a non-dict");
33231  return -1;
33232  }
33233  tmp = op->func_dict;
33234  Py_INCREF(value);
33235  op->func_dict = value;
33236  Py_XDECREF(tmp);
33237  return 0;
33238 }
33239 static PyObject *
33240 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
33241 {
33242  Py_INCREF(op->func_globals);
33243  return op->func_globals;
33244 }
33245 static PyObject *
33246 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
33247 {
33248  Py_INCREF(Py_None);
33249  return Py_None;
33250 }
33251 static PyObject *
33252 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
33253 {
33254  PyObject* result = (op->func_code) ? op->func_code : Py_None;
33255  Py_INCREF(result);
33256  return result;
33257 }
33258 static int
33259 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
33260  int result = 0;
33261  PyObject *res = op->defaults_getter((PyObject *) op);
33262  if (unlikely(!res))
33263  return -1;
33264  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
33265  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
33266  Py_INCREF(op->defaults_tuple);
33267  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
33268  Py_INCREF(op->defaults_kwdict);
33269  #else
33270  op->defaults_tuple = PySequence_ITEM(res, 0);
33271  if (unlikely(!op->defaults_tuple)) result = -1;
33272  else {
33273  op->defaults_kwdict = PySequence_ITEM(res, 1);
33274  if (unlikely(!op->defaults_kwdict)) result = -1;
33275  }
33276  #endif
33277  Py_DECREF(res);
33278  return result;
33279 }
33280 static int
33281 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
33282  PyObject* tmp;
33283  if (!value) {
33284  value = Py_None;
33285  } else if (value != Py_None && !PyTuple_Check(value)) {
33286  PyErr_SetString(PyExc_TypeError,
33287  "__defaults__ must be set to a tuple object");
33288  return -1;
33289  }
33290  Py_INCREF(value);
33291  tmp = op->defaults_tuple;
33292  op->defaults_tuple = value;
33293  Py_XDECREF(tmp);
33294  return 0;
33295 }
33296 static PyObject *
33297 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
33298  PyObject* result = op->defaults_tuple;
33299  if (unlikely(!result)) {
33300  if (op->defaults_getter) {
33301  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
33302  result = op->defaults_tuple;
33303  } else {
33304  result = Py_None;
33305  }
33306  }
33307  Py_INCREF(result);
33308  return result;
33309 }
33310 static int
33311 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
33312  PyObject* tmp;
33313  if (!value) {
33314  value = Py_None;
33315  } else if (value != Py_None && !PyDict_Check(value)) {
33316  PyErr_SetString(PyExc_TypeError,
33317  "__kwdefaults__ must be set to a dict object");
33318  return -1;
33319  }
33320  Py_INCREF(value);
33321  tmp = op->defaults_kwdict;
33322  op->defaults_kwdict = value;
33323  Py_XDECREF(tmp);
33324  return 0;
33325 }
33326 static PyObject *
33327 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
33328  PyObject* result = op->defaults_kwdict;
33329  if (unlikely(!result)) {
33330  if (op->defaults_getter) {
33331  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
33332  result = op->defaults_kwdict;
33333  } else {
33334  result = Py_None;
33335  }
33336  }
33337  Py_INCREF(result);
33338  return result;
33339 }
33340 static int
33341 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
33342  PyObject* tmp;
33343  if (!value || value == Py_None) {
33344  value = NULL;
33345  } else if (!PyDict_Check(value)) {
33346  PyErr_SetString(PyExc_TypeError,
33347  "__annotations__ must be set to a dict object");
33348  return -1;
33349  }
33350  Py_XINCREF(value);
33351  tmp = op->func_annotations;
33352  op->func_annotations = value;
33353  Py_XDECREF(tmp);
33354  return 0;
33355 }
33356 static PyObject *
33357 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
33358  PyObject* result = op->func_annotations;
33359  if (unlikely(!result)) {
33360  result = PyDict_New();
33361  if (unlikely(!result)) return NULL;
33362  op->func_annotations = result;
33363  }
33364  Py_INCREF(result);
33365  return result;
33366 }
33367 static PyGetSetDef __pyx_CyFunction_getsets[] = {
33368  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
33369  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
33370  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
33371  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
33372  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
33373  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
33374  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
33375  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
33376  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
33377  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
33378  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
33379  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
33380  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
33381  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
33382  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
33383  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
33384  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
33385  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
33386  {0, 0, 0, 0, 0}
33387 };
33388 static PyMemberDef __pyx_CyFunction_members[] = {
33389  {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
33390  {0, 0, 0, 0, 0}
33391 };
33392 static PyObject *
33393 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
33394 {
33395 #if PY_MAJOR_VERSION >= 3
33396  return PyUnicode_FromString(m->func.m_ml->ml_name);
33397 #else
33398  return PyString_FromString(m->func.m_ml->ml_name);
33399 #endif
33400 }
33401 static PyMethodDef __pyx_CyFunction_methods[] = {
33402  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
33403  {0, 0, 0, 0}
33404 };
33405 #if PY_VERSION_HEX < 0x030500A0
33406 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
33407 #else
33408 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
33409 #endif
33410 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
33411  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
33412  __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
33413  if (op == NULL)
33414  return NULL;
33415  op->flags = flags;
33416  __Pyx_CyFunction_weakreflist(op) = NULL;
33417  op->func.m_ml = ml;
33418  op->func.m_self = (PyObject *) op;
33419  Py_XINCREF(closure);
33420  op->func_closure = closure;
33421  Py_XINCREF(module);
33422  op->func.m_module = module;
33423  op->func_dict = NULL;
33424  op->func_name = NULL;
33425  Py_INCREF(qualname);
33426  op->func_qualname = qualname;
33427  op->func_doc = NULL;
33428  op->func_classobj = NULL;
33429  op->func_globals = globals;
33430  Py_INCREF(op->func_globals);
33431  Py_XINCREF(code);
33432  op->func_code = code;
33433  op->defaults_pyobjects = 0;
33434  op->defaults = NULL;
33435  op->defaults_tuple = NULL;
33436  op->defaults_kwdict = NULL;
33437  op->defaults_getter = NULL;
33438  op->func_annotations = NULL;
33439  PyObject_GC_Track(op);
33440  return (PyObject *) op;
33441 }
33442 static int
33443 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
33444 {
33445  Py_CLEAR(m->func_closure);
33446  Py_CLEAR(m->func.m_module);
33447  Py_CLEAR(m->func_dict);
33448  Py_CLEAR(m->func_name);
33449  Py_CLEAR(m->func_qualname);
33450  Py_CLEAR(m->func_doc);
33451  Py_CLEAR(m->func_globals);
33452  Py_CLEAR(m->func_code);
33453  Py_CLEAR(m->func_classobj);
33454  Py_CLEAR(m->defaults_tuple);
33455  Py_CLEAR(m->defaults_kwdict);
33456  Py_CLEAR(m->func_annotations);
33457  if (m->defaults) {
33458  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
33459  int i;
33460  for (i = 0; i < m->defaults_pyobjects; i++)
33461  Py_XDECREF(pydefaults[i]);
33462  PyObject_Free(m->defaults);
33463  m->defaults = NULL;
33464  }
33465  return 0;
33466 }
33467 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
33468 {
33469  PyObject_GC_UnTrack(m);
33470  if (__Pyx_CyFunction_weakreflist(m) != NULL)
33471  PyObject_ClearWeakRefs((PyObject *) m);
33472  __Pyx_CyFunction_clear(m);
33473  PyObject_GC_Del(m);
33474 }
33475 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
33476 {
33477  Py_VISIT(m->func_closure);
33478  Py_VISIT(m->func.m_module);
33479  Py_VISIT(m->func_dict);
33480  Py_VISIT(m->func_name);
33481  Py_VISIT(m->func_qualname);
33482  Py_VISIT(m->func_doc);
33483  Py_VISIT(m->func_globals);
33484  Py_VISIT(m->func_code);
33485  Py_VISIT(m->func_classobj);
33486  Py_VISIT(m->defaults_tuple);
33487  Py_VISIT(m->defaults_kwdict);
33488  if (m->defaults) {
33489  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
33490  int i;
33491  for (i = 0; i < m->defaults_pyobjects; i++)
33492  Py_VISIT(pydefaults[i]);
33493  }
33494  return 0;
33495 }
33496 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
33497 {
33498  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33499  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
33500  Py_INCREF(func);
33501  return func;
33502  }
33503  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
33504  if (type == NULL)
33505  type = (PyObject *)(Py_TYPE(obj));
33506  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
33507  }
33508  if (obj == Py_None)
33509  obj = NULL;
33510  return __Pyx_PyMethod_New(func, obj, type);
33511 }
33512 static PyObject*
33513 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
33514 {
33515 #if PY_MAJOR_VERSION >= 3
33516  return PyUnicode_FromFormat("<cyfunction %U at %p>",
33517  op->func_qualname, (void *)op);
33518 #else
33519  return PyString_FromFormat("<cyfunction %s at %p>",
33520  PyString_AsString(op->func_qualname), (void *)op);
33521 #endif
33522 }
33523 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
33524  PyCFunctionObject* f = (PyCFunctionObject*)func;
33525  PyCFunction meth = f->m_ml->ml_meth;
33526  Py_ssize_t size;
33527  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
33528  case METH_VARARGS:
33529  if (likely(kw == NULL || PyDict_Size(kw) == 0))
33530  return (*meth)(self, arg);
33531  break;
33532  case METH_VARARGS | METH_KEYWORDS:
33533  return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
33534  case METH_NOARGS:
33535  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
33536  size = PyTuple_GET_SIZE(arg);
33537  if (likely(size == 0))
33538  return (*meth)(self, NULL);
33539  PyErr_Format(PyExc_TypeError,
33540  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
33541  f->m_ml->ml_name, size);
33542  return NULL;
33543  }
33544  break;
33545  case METH_O:
33546  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
33547  size = PyTuple_GET_SIZE(arg);
33548  if (likely(size == 1)) {
33549  PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
33550  if (unlikely(!arg0)) return NULL;
33551  result = (*meth)(self, arg0);
33552  Py_DECREF(arg0);
33553  return result;
33554  }
33555  PyErr_Format(PyExc_TypeError,
33556  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
33557  f->m_ml->ml_name, size);
33558  return NULL;
33559  }
33560  break;
33561  default:
33562  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
33563  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
33564  "longer supported!");
33565  return NULL;
33566  }
33567  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
33568  f->m_ml->ml_name);
33569  return NULL;
33570 }
33571 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
33572  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
33573 }
33574 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
33575  PyObject *result;
33576  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
33577  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
33578  Py_ssize_t argc;
33579  PyObject *new_args;
33580  PyObject *self;
33581  argc = PyTuple_GET_SIZE(args);
33582  new_args = PyTuple_GetSlice(args, 1, argc);
33583  if (unlikely(!new_args))
33584  return NULL;
33585  self = PyTuple_GetItem(args, 0);
33586  if (unlikely(!self)) {
33587  Py_DECREF(new_args);
33588  return NULL;
33589  }
33590  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
33591  Py_DECREF(new_args);
33592  } else {
33593  result = __Pyx_CyFunction_Call(func, args, kw);
33594  }
33595  return result;
33596 }
33597 static PyTypeObject __pyx_CyFunctionType_type = {
33598  PyVarObject_HEAD_INIT(0, 0)
33599  "cython_function_or_method",
33600  sizeof(__pyx_CyFunctionObject),
33601  0,
33602  (destructor) __Pyx_CyFunction_dealloc,
33603  0,
33604  0,
33605  0,
33606 #if PY_MAJOR_VERSION < 3
33607  0,
33608 #else
33609  0,
33610 #endif
33611  (reprfunc) __Pyx_CyFunction_repr,
33612  0,
33613  0,
33614  0,
33615  0,
33616  __Pyx_CyFunction_CallAsMethod,
33617  0,
33618  0,
33619  0,
33620  0,
33621  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
33622  0,
33623  (traverseproc) __Pyx_CyFunction_traverse,
33624  (inquiry) __Pyx_CyFunction_clear,
33625  0,
33626 #if PY_VERSION_HEX < 0x030500A0
33627  offsetof(__pyx_CyFunctionObject, func_weakreflist),
33628 #else
33629  offsetof(PyCFunctionObject, m_weakreflist),
33630 #endif
33631  0,
33632  0,
33633  __pyx_CyFunction_methods,
33634  __pyx_CyFunction_members,
33635  __pyx_CyFunction_getsets,
33636  0,
33637  0,
33638  __Pyx_CyFunction_descr_get,
33639  0,
33640  offsetof(__pyx_CyFunctionObject, func_dict),
33641  0,
33642  0,
33643  0,
33644  0,
33645  0,
33646  0,
33647  0,
33648  0,
33649  0,
33650  0,
33651  0,
33652  0,
33653 #if PY_VERSION_HEX >= 0x030400a1
33654  0,
33655 #endif
33656 };
33657 static int __pyx_CyFunction_init(void) {
33658  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
33659  if (__pyx_CyFunctionType == NULL) {
33660  return -1;
33661  }
33662  return 0;
33663 }
33664 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
33665  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33666  m->defaults = PyObject_Malloc(size);
33667  if (!m->defaults)
33668  return PyErr_NoMemory();
33669  memset(m->defaults, 0, size);
33670  m->defaults_pyobjects = pyobjects;
33671  return m->defaults;
33672 }
33673 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
33674  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33675  m->defaults_tuple = tuple;
33676  Py_INCREF(tuple);
33677 }
33678 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
33679  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33680  m->defaults_kwdict = dict;
33681  Py_INCREF(dict);
33682 }
33683 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
33684  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
33685  m->func_annotations = dict;
33686  Py_INCREF(dict);
33687 }
33688 
33689 /* Py3ClassCreate */
33690  static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
33691  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
33692  PyObject *ns;
33693  if (metaclass) {
33694  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
33695  if (prep) {
33696  PyObject *pargs = PyTuple_Pack(2, name, bases);
33697  if (unlikely(!pargs)) {
33698  Py_DECREF(prep);
33699  return NULL;
33700  }
33701  ns = PyObject_Call(prep, pargs, mkw);
33702  Py_DECREF(prep);
33703  Py_DECREF(pargs);
33704  } else {
33705  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
33706  return NULL;
33707  PyErr_Clear();
33708  ns = PyDict_New();
33709  }
33710  } else {
33711  ns = PyDict_New();
33712  }
33713  if (unlikely(!ns))
33714  return NULL;
33715  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
33716  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
33717  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
33718  return ns;
33719 bad:
33720  Py_DECREF(ns);
33721  return NULL;
33722 }
33723 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
33724  PyObject *dict, PyObject *mkw,
33725  int calculate_metaclass, int allow_py2_metaclass) {
33726  PyObject *result, *margs;
33727  PyObject *owned_metaclass = NULL;
33728  if (allow_py2_metaclass) {
33729  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
33730  if (owned_metaclass) {
33731  metaclass = owned_metaclass;
33732  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
33733  PyErr_Clear();
33734  } else {
33735  return NULL;
33736  }
33737  }
33738  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
33739  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
33740  Py_XDECREF(owned_metaclass);
33741  if (unlikely(!metaclass))
33742  return NULL;
33743  owned_metaclass = metaclass;
33744  }
33745  margs = PyTuple_Pack(3, name, bases, dict);
33746  if (unlikely(!margs)) {
33747  result = NULL;
33748  } else {
33749  result = PyObject_Call(metaclass, margs, mkw);
33750  Py_DECREF(margs);
33751  }
33752  Py_XDECREF(owned_metaclass);
33753  return result;
33754 }
33755 
33756 /* CodeObjectCache */
33757  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
33758  int start = 0, mid = 0, end = count - 1;
33759  if (end >= 0 && code_line > entries[end].code_line) {
33760  return count;
33761  }
33762  while (start < end) {
33763  mid = start + (end - start) / 2;
33764  if (code_line < entries[mid].code_line) {
33765  end = mid;
33766  } else if (code_line > entries[mid].code_line) {
33767  start = mid + 1;
33768  } else {
33769  return mid;
33770  }
33771  }
33772  if (code_line <= entries[mid].code_line) {
33773  return mid;
33774  } else {
33775  return mid + 1;
33776  }
33777 }
33778 static PyCodeObject *__pyx_find_code_object(int code_line) {
33779  PyCodeObject* code_object;
33780  int pos;
33781  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
33782  return NULL;
33783  }
33784  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
33785  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
33786  return NULL;
33787  }
33788  code_object = __pyx_code_cache.entries[pos].code_object;
33789  Py_INCREF(code_object);
33790  return code_object;
33791 }
33792 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
33793  int pos, i;
33794  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
33795  if (unlikely(!code_line)) {
33796  return;
33797  }
33798  if (unlikely(!entries)) {
33799  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
33800  if (likely(entries)) {
33801  __pyx_code_cache.entries = entries;
33802  __pyx_code_cache.max_count = 64;
33803  __pyx_code_cache.count = 1;
33804  entries[0].code_line = code_line;
33805  entries[0].code_object = code_object;
33806  Py_INCREF(code_object);
33807  }
33808  return;
33809  }
33810  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
33811  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
33812  PyCodeObject* tmp = entries[pos].code_object;
33813  entries[pos].code_object = code_object;
33814  Py_DECREF(tmp);
33815  return;
33816  }
33817  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
33818  int new_max = __pyx_code_cache.max_count + 64;
33819  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
33820  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
33821  if (unlikely(!entries)) {
33822  return;
33823  }
33824  __pyx_code_cache.entries = entries;
33825  __pyx_code_cache.max_count = new_max;
33826  }
33827  for (i=__pyx_code_cache.count; i>pos; i--) {
33828  entries[i] = entries[i-1];
33829  }
33830  entries[pos].code_line = code_line;
33831  entries[pos].code_object = code_object;
33832  __pyx_code_cache.count++;
33833  Py_INCREF(code_object);
33834 }
33835 
33836 /* AddTraceback */
33837  #include "compile.h"
33838 #include "frameobject.h"
33839 #include "traceback.h"
33840 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
33841  const char *funcname, int c_line,
33842  int py_line, const char *filename) {
33843  PyCodeObject *py_code = 0;
33844  PyObject *py_srcfile = 0;
33845  PyObject *py_funcname = 0;
33846  #if PY_MAJOR_VERSION < 3
33847  py_srcfile = PyString_FromString(filename);
33848  #else
33849  py_srcfile = PyUnicode_FromString(filename);
33850  #endif
33851  if (!py_srcfile) goto bad;
33852  if (c_line) {
33853  #if PY_MAJOR_VERSION < 3
33854  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33855  #else
33856  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33857  #endif
33858  }
33859  else {
33860  #if PY_MAJOR_VERSION < 3
33861  py_funcname = PyString_FromString(funcname);
33862  #else
33863  py_funcname = PyUnicode_FromString(funcname);
33864  #endif
33865  }
33866  if (!py_funcname) goto bad;
33867  py_code = __Pyx_PyCode_New(
33868  0,
33869  0,
33870  0,
33871  0,
33872  0,
33873  __pyx_empty_bytes, /*PyObject *code,*/
33874  __pyx_empty_tuple, /*PyObject *consts,*/
33875  __pyx_empty_tuple, /*PyObject *names,*/
33876  __pyx_empty_tuple, /*PyObject *varnames,*/
33877  __pyx_empty_tuple, /*PyObject *freevars,*/
33878  __pyx_empty_tuple, /*PyObject *cellvars,*/
33879  py_srcfile, /*PyObject *filename,*/
33880  py_funcname, /*PyObject *name,*/
33881  py_line,
33882  __pyx_empty_bytes /*PyObject *lnotab*/
33883  );
33884  Py_DECREF(py_srcfile);
33885  Py_DECREF(py_funcname);
33886  return py_code;
33887 bad:
33888  Py_XDECREF(py_srcfile);
33889  Py_XDECREF(py_funcname);
33890  return NULL;
33891 }
33892 static void __Pyx_AddTraceback(const char *funcname, int c_line,
33893  int py_line, const char *filename) {
33894  PyCodeObject *py_code = 0;
33895  PyFrameObject *py_frame = 0;
33896  py_code = __pyx_find_code_object(c_line ? c_line : py_line);
33897  if (!py_code) {
33898  py_code = __Pyx_CreateCodeObjectForTraceback(
33899  funcname, c_line, py_line, filename);
33900  if (!py_code) goto bad;
33901  __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
33902  }
33903  py_frame = PyFrame_New(
33904  PyThreadState_GET(), /*PyThreadState *tstate,*/
33905  py_code, /*PyCodeObject *code,*/
33906  __pyx_d, /*PyObject *globals,*/
33907  0 /*PyObject *locals*/
33908  );
33909  if (!py_frame) goto bad;
33910  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
33911  PyTraceBack_Here(py_frame);
33912 bad:
33913  Py_XDECREF(py_code);
33914  Py_XDECREF(py_frame);
33915 }
33916 
33917 /* CIntFromPyVerify */
33918  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
33919  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
33920 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
33921  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
33922 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
33923  {\
33924  func_type value = func_value;\
33925  if (sizeof(target_type) < sizeof(func_type)) {\
33926  if (unlikely(value != (func_type) (target_type) value)) {\
33927  func_type zero = 0;\
33928  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
33929  return (target_type) -1;\
33930  if (is_unsigned && unlikely(value < zero))\
33931  goto raise_neg_overflow;\
33932  else\
33933  goto raise_overflow;\
33934  }\
33935  }\
33936  return (target_type) value;\
33937  }
33938 
33939 /* CIntToPy */
33940  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
33941  const long neg_one = (long) -1, const_zero = (long) 0;
33942  const int is_unsigned = neg_one > const_zero;
33943  if (is_unsigned) {
33944  if (sizeof(long) < sizeof(long)) {
33945  return PyInt_FromLong((long) value);
33946  } else if (sizeof(long) <= sizeof(unsigned long)) {
33947  return PyLong_FromUnsignedLong((unsigned long) value);
33948 #ifdef HAVE_LONG_LONG
33949  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
33950  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
33951 #endif
33952  }
33953  } else {
33954  if (sizeof(long) <= sizeof(long)) {
33955  return PyInt_FromLong((long) value);
33956 #ifdef HAVE_LONG_LONG
33957  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
33958  return PyLong_FromLongLong((PY_LONG_LONG) value);
33959 #endif
33960  }
33961  }
33962  {
33963  int one = 1; int little = (int)*(unsigned char *)&one;
33964  unsigned char *bytes = (unsigned char *)&value;
33965  return _PyLong_FromByteArray(bytes, sizeof(long),
33966  little, !is_unsigned);
33967  }
33968 }
33969 
33970 /* Declarations */
33971  #if CYTHON_CCOMPLEX
33972  #ifdef __cplusplus
33973  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33974  return ::std::complex< float >(x, y);
33975  }
33976  #else
33977  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33978  return x + y*(__pyx_t_float_complex)_Complex_I;
33979  }
33980  #endif
33981 #else
33982  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33983  __pyx_t_float_complex z;
33984  z.real = x;
33985  z.imag = y;
33986  return z;
33987  }
33988 #endif
33989 
33990 /* Arithmetic */
33991  #if CYTHON_CCOMPLEX
33992 #else
33993  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33994  return (a.real == b.real) && (a.imag == b.imag);
33995  }
33996  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33997  __pyx_t_float_complex z;
33998  z.real = a.real + b.real;
33999  z.imag = a.imag + b.imag;
34000  return z;
34001  }
34002  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34003  __pyx_t_float_complex z;
34004  z.real = a.real - b.real;
34005  z.imag = a.imag - b.imag;
34006  return z;
34007  }
34008  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34009  __pyx_t_float_complex z;
34010  z.real = a.real * b.real - a.imag * b.imag;
34011  z.imag = a.real * b.imag + a.imag * b.real;
34012  return z;
34013  }
34014  #if 1
34015  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34016  if (b.imag == 0) {
34017  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
34018  } else if (fabsf(b.real) >= fabsf(b.imag)) {
34019  if (b.real == 0 && b.imag == 0) {
34020  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
34021  } else {
34022  float r = b.imag / b.real;
34023  float s = 1.0 / (b.real + b.imag * r);
34024  return __pyx_t_float_complex_from_parts(
34025  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
34026  }
34027  } else {
34028  float r = b.real / b.imag;
34029  float s = 1.0 / (b.imag + b.real * r);
34030  return __pyx_t_float_complex_from_parts(
34031  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
34032  }
34033  }
34034  #else
34035  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34036  if (b.imag == 0) {
34037  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
34038  } else {
34039  float denom = b.real * b.real + b.imag * b.imag;
34040  return __pyx_t_float_complex_from_parts(
34041  (a.real * b.real + a.imag * b.imag) / denom,
34042  (a.imag * b.real - a.real * b.imag) / denom);
34043  }
34044  }
34045  #endif
34046  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
34047  __pyx_t_float_complex z;
34048  z.real = -a.real;
34049  z.imag = -a.imag;
34050  return z;
34051  }
34052  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
34053  return (a.real == 0) && (a.imag == 0);
34054  }
34055  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
34056  __pyx_t_float_complex z;
34057  z.real = a.real;
34058  z.imag = -a.imag;
34059  return z;
34060  }
34061  #if 1
34062  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
34063  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
34064  return sqrtf(z.real*z.real + z.imag*z.imag);
34065  #else
34066  return hypotf(z.real, z.imag);
34067  #endif
34068  }
34069  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
34070  __pyx_t_float_complex z;
34071  float r, lnr, theta, z_r, z_theta;
34072  if (b.imag == 0 && b.real == (int)b.real) {
34073  if (b.real < 0) {
34074  float denom = a.real * a.real + a.imag * a.imag;
34075  a.real = a.real / denom;
34076  a.imag = -a.imag / denom;
34077  b.real = -b.real;
34078  }
34079  switch ((int)b.real) {
34080  case 0:
34081  z.real = 1;
34082  z.imag = 0;
34083  return z;
34084  case 1:
34085  return a;
34086  case 2:
34087  z = __Pyx_c_prod_float(a, a);
34088  return __Pyx_c_prod_float(a, a);
34089  case 3:
34090  z = __Pyx_c_prod_float(a, a);
34091  return __Pyx_c_prod_float(z, a);
34092  case 4:
34093  z = __Pyx_c_prod_float(a, a);
34094  return __Pyx_c_prod_float(z, z);
34095  }
34096  }
34097  if (a.imag == 0) {
34098  if (a.real == 0) {
34099  return a;
34100  } else if (b.imag == 0) {
34101  z.real = powf(a.real, b.real);
34102  z.imag = 0;
34103  return z;
34104  } else if (a.real > 0) {
34105  r = a.real;
34106  theta = 0;
34107  } else {
34108  r = -a.real;
34109  theta = atan2f(0, -1);
34110  }
34111  } else {
34112  r = __Pyx_c_abs_float(a);
34113  theta = atan2f(a.imag, a.real);
34114  }
34115  lnr = logf(r);
34116  z_r = expf(lnr * b.real - theta * b.imag);
34117  z_theta = theta * b.real + lnr * b.imag;
34118  z.real = z_r * cosf(z_theta);
34119  z.imag = z_r * sinf(z_theta);
34120  return z;
34121  }
34122  #endif
34123 #endif
34124 
34125 /* Declarations */
34126  #if CYTHON_CCOMPLEX
34127  #ifdef __cplusplus
34128  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34129  return ::std::complex< double >(x, y);
34130  }
34131  #else
34132  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34133  return x + y*(__pyx_t_double_complex)_Complex_I;
34134  }
34135  #endif
34136 #else
34137  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
34138  __pyx_t_double_complex z;
34139  z.real = x;
34140  z.imag = y;
34141  return z;
34142  }
34143 #endif
34144 
34145 /* Arithmetic */
34146  #if CYTHON_CCOMPLEX
34147 #else
34148  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34149  return (a.real == b.real) && (a.imag == b.imag);
34150  }
34151  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34152  __pyx_t_double_complex z;
34153  z.real = a.real + b.real;
34154  z.imag = a.imag + b.imag;
34155  return z;
34156  }
34157  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34158  __pyx_t_double_complex z;
34159  z.real = a.real - b.real;
34160  z.imag = a.imag - b.imag;
34161  return z;
34162  }
34163  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34164  __pyx_t_double_complex z;
34165  z.real = a.real * b.real - a.imag * b.imag;
34166  z.imag = a.real * b.imag + a.imag * b.real;
34167  return z;
34168  }
34169  #if 1
34170  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34171  if (b.imag == 0) {
34172  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
34173  } else if (fabs(b.real) >= fabs(b.imag)) {
34174  if (b.real == 0 && b.imag == 0) {
34175  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
34176  } else {
34177  double r = b.imag / b.real;
34178  double s = 1.0 / (b.real + b.imag * r);
34179  return __pyx_t_double_complex_from_parts(
34180  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
34181  }
34182  } else {
34183  double r = b.real / b.imag;
34184  double s = 1.0 / (b.imag + b.real * r);
34185  return __pyx_t_double_complex_from_parts(
34186  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
34187  }
34188  }
34189  #else
34190  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34191  if (b.imag == 0) {
34192  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
34193  } else {
34194  double denom = b.real * b.real + b.imag * b.imag;
34195  return __pyx_t_double_complex_from_parts(
34196  (a.real * b.real + a.imag * b.imag) / denom,
34197  (a.imag * b.real - a.real * b.imag) / denom);
34198  }
34199  }
34200  #endif
34201  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
34202  __pyx_t_double_complex z;
34203  z.real = -a.real;
34204  z.imag = -a.imag;
34205  return z;
34206  }
34207  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
34208  return (a.real == 0) && (a.imag == 0);
34209  }
34210  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
34211  __pyx_t_double_complex z;
34212  z.real = a.real;
34213  z.imag = -a.imag;
34214  return z;
34215  }
34216  #if 1
34217  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
34218  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
34219  return sqrt(z.real*z.real + z.imag*z.imag);
34220  #else
34221  return hypot(z.real, z.imag);
34222  #endif
34223  }
34224  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
34225  __pyx_t_double_complex z;
34226  double r, lnr, theta, z_r, z_theta;
34227  if (b.imag == 0 && b.real == (int)b.real) {
34228  if (b.real < 0) {
34229  double denom = a.real * a.real + a.imag * a.imag;
34230  a.real = a.real / denom;
34231  a.imag = -a.imag / denom;
34232  b.real = -b.real;
34233  }
34234  switch ((int)b.real) {
34235  case 0:
34236  z.real = 1;
34237  z.imag = 0;
34238  return z;
34239  case 1:
34240  return a;
34241  case 2:
34242  z = __Pyx_c_prod_double(a, a);
34243  return __Pyx_c_prod_double(a, a);
34244  case 3:
34245  z = __Pyx_c_prod_double(a, a);
34246  return __Pyx_c_prod_double(z, a);
34247  case 4:
34248  z = __Pyx_c_prod_double(a, a);
34249  return __Pyx_c_prod_double(z, z);
34250  }
34251  }
34252  if (a.imag == 0) {
34253  if (a.real == 0) {
34254  return a;
34255  } else if (b.imag == 0) {
34256  z.real = pow(a.real, b.real);
34257  z.imag = 0;
34258  return z;
34259  } else if (a.real > 0) {
34260  r = a.real;
34261  theta = 0;
34262  } else {
34263  r = -a.real;
34264  theta = atan2(0, -1);
34265  }
34266  } else {
34267  r = __Pyx_c_abs_double(a);
34268  theta = atan2(a.imag, a.real);
34269  }
34270  lnr = log(r);
34271  z_r = exp(lnr * b.real - theta * b.imag);
34272  z_theta = theta * b.real + lnr * b.imag;
34273  z.real = z_r * cos(z_theta);
34274  z.imag = z_r * sin(z_theta);
34275  return z;
34276  }
34277  #endif
34278 #endif
34279 
34280 /* CIntToPy */
34281  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
34282  const int neg_one = (int) -1, const_zero = (int) 0;
34283  const int is_unsigned = neg_one > const_zero;
34284  if (is_unsigned) {
34285  if (sizeof(int) < sizeof(long)) {
34286  return PyInt_FromLong((long) value);
34287  } else if (sizeof(int) <= sizeof(unsigned long)) {
34288  return PyLong_FromUnsignedLong((unsigned long) value);
34289 #ifdef HAVE_LONG_LONG
34290  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
34291  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
34292 #endif
34293  }
34294  } else {
34295  if (sizeof(int) <= sizeof(long)) {
34296  return PyInt_FromLong((long) value);
34297 #ifdef HAVE_LONG_LONG
34298  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
34299  return PyLong_FromLongLong((PY_LONG_LONG) value);
34300 #endif
34301  }
34302  }
34303  {
34304  int one = 1; int little = (int)*(unsigned char *)&one;
34305  unsigned char *bytes = (unsigned char *)&value;
34306  return _PyLong_FromByteArray(bytes, sizeof(int),
34307  little, !is_unsigned);
34308  }
34309 }
34310 
34311 /* CIntToPy */
34312  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
34313  const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
34314  const int is_unsigned = neg_one > const_zero;
34315  if (is_unsigned) {
34316  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
34317  return PyInt_FromLong((long) value);
34318  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
34319  return PyLong_FromUnsignedLong((unsigned long) value);
34320 #ifdef HAVE_LONG_LONG
34321  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
34322  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
34323 #endif
34324  }
34325  } else {
34326  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
34327  return PyInt_FromLong((long) value);
34328 #ifdef HAVE_LONG_LONG
34329  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
34330  return PyLong_FromLongLong((PY_LONG_LONG) value);
34331 #endif
34332  }
34333  }
34334  {
34335  int one = 1; int little = (int)*(unsigned char *)&one;
34336  unsigned char *bytes = (unsigned char *)&value;
34337  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
34338  little, !is_unsigned);
34339  }
34340 }
34341 
34342 /* CIntFromPy */
34343  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
34344  const int neg_one = (int) -1, const_zero = (int) 0;
34345  const int is_unsigned = neg_one > const_zero;
34346 #if PY_MAJOR_VERSION < 3
34347  if (likely(PyInt_Check(x))) {
34348  if (sizeof(int) < sizeof(long)) {
34349  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
34350  } else {
34351  long val = PyInt_AS_LONG(x);
34352  if (is_unsigned && unlikely(val < 0)) {
34353  goto raise_neg_overflow;
34354  }
34355  return (int) val;
34356  }
34357  } else
34358 #endif
34359  if (likely(PyLong_Check(x))) {
34360  if (is_unsigned) {
34361 #if CYTHON_USE_PYLONG_INTERNALS
34362  const digit* digits = ((PyLongObject*)x)->ob_digit;
34363  switch (Py_SIZE(x)) {
34364  case 0: return (int) 0;
34365  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
34366  case 2:
34367  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
34368  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34369  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34370  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
34371  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34372  }
34373  }
34374  break;
34375  case 3:
34376  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
34377  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34378  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34379  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
34380  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34381  }
34382  }
34383  break;
34384  case 4:
34385  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
34386  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34387  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34388  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
34389  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
34390  }
34391  }
34392  break;
34393  }
34394 #endif
34395 #if CYTHON_COMPILING_IN_CPYTHON
34396  if (unlikely(Py_SIZE(x) < 0)) {
34397  goto raise_neg_overflow;
34398  }
34399 #else
34400  {
34401  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
34402  if (unlikely(result < 0))
34403  return (int) -1;
34404  if (unlikely(result == 1))
34405  goto raise_neg_overflow;
34406  }
34407 #endif
34408  if (sizeof(int) <= sizeof(unsigned long)) {
34409  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
34410 #ifdef HAVE_LONG_LONG
34411  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
34412  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
34413 #endif
34414  }
34415  } else {
34416 #if CYTHON_USE_PYLONG_INTERNALS
34417  const digit* digits = ((PyLongObject*)x)->ob_digit;
34418  switch (Py_SIZE(x)) {
34419  case 0: return (int) 0;
34420  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
34421  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
34422  case -2:
34423  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
34424  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34425  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34426  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34427  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34428  }
34429  }
34430  break;
34431  case 2:
34432  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
34433  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34434  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34435  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34436  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34437  }
34438  }
34439  break;
34440  case -3:
34441  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
34442  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34443  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34444  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34445  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34446  }
34447  }
34448  break;
34449  case 3:
34450  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
34451  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34452  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34453  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34454  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34455  }
34456  }
34457  break;
34458  case -4:
34459  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
34460  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34461  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34462  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
34463  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34464  }
34465  }
34466  break;
34467  case 4:
34468  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
34469  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34470  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34471  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
34472  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
34473  }
34474  }
34475  break;
34476  }
34477 #endif
34478  if (sizeof(int) <= sizeof(long)) {
34479  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
34480 #ifdef HAVE_LONG_LONG
34481  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
34482  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
34483 #endif
34484  }
34485  }
34486  {
34487 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
34488  PyErr_SetString(PyExc_RuntimeError,
34489  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
34490 #else
34491  int val;
34492  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
34493  #if PY_MAJOR_VERSION < 3
34494  if (likely(v) && !PyLong_Check(v)) {
34495  PyObject *tmp = v;
34496  v = PyNumber_Long(tmp);
34497  Py_DECREF(tmp);
34498  }
34499  #endif
34500  if (likely(v)) {
34501  int one = 1; int is_little = (int)*(unsigned char *)&one;
34502  unsigned char *bytes = (unsigned char *)&val;
34503  int ret = _PyLong_AsByteArray((PyLongObject *)v,
34504  bytes, sizeof(val),
34505  is_little, !is_unsigned);
34506  Py_DECREF(v);
34507  if (likely(!ret))
34508  return val;
34509  }
34510 #endif
34511  return (int) -1;
34512  }
34513  } else {
34514  int val;
34515  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
34516  if (!tmp) return (int) -1;
34517  val = __Pyx_PyInt_As_int(tmp);
34518  Py_DECREF(tmp);
34519  return val;
34520  }
34521 raise_overflow:
34522  PyErr_SetString(PyExc_OverflowError,
34523  "value too large to convert to int");
34524  return (int) -1;
34525 raise_neg_overflow:
34526  PyErr_SetString(PyExc_OverflowError,
34527  "can't convert negative value to int");
34528  return (int) -1;
34529 }
34530 
34531 /* CIntFromPy */
34532  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
34533  const long neg_one = (long) -1, const_zero = (long) 0;
34534  const int is_unsigned = neg_one > const_zero;
34535 #if PY_MAJOR_VERSION < 3
34536  if (likely(PyInt_Check(x))) {
34537  if (sizeof(long) < sizeof(long)) {
34538  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
34539  } else {
34540  long val = PyInt_AS_LONG(x);
34541  if (is_unsigned && unlikely(val < 0)) {
34542  goto raise_neg_overflow;
34543  }
34544  return (long) val;
34545  }
34546  } else
34547 #endif
34548  if (likely(PyLong_Check(x))) {
34549  if (is_unsigned) {
34550 #if CYTHON_USE_PYLONG_INTERNALS
34551  const digit* digits = ((PyLongObject*)x)->ob_digit;
34552  switch (Py_SIZE(x)) {
34553  case 0: return (long) 0;
34554  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
34555  case 2:
34556  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
34557  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34558  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34559  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
34560  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34561  }
34562  }
34563  break;
34564  case 3:
34565  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
34566  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34567  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34568  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
34569  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34570  }
34571  }
34572  break;
34573  case 4:
34574  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
34575  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34576  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34577  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
34578  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
34579  }
34580  }
34581  break;
34582  }
34583 #endif
34584 #if CYTHON_COMPILING_IN_CPYTHON
34585  if (unlikely(Py_SIZE(x) < 0)) {
34586  goto raise_neg_overflow;
34587  }
34588 #else
34589  {
34590  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
34591  if (unlikely(result < 0))
34592  return (long) -1;
34593  if (unlikely(result == 1))
34594  goto raise_neg_overflow;
34595  }
34596 #endif
34597  if (sizeof(long) <= sizeof(unsigned long)) {
34598  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
34599 #ifdef HAVE_LONG_LONG
34600  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
34601  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
34602 #endif
34603  }
34604  } else {
34605 #if CYTHON_USE_PYLONG_INTERNALS
34606  const digit* digits = ((PyLongObject*)x)->ob_digit;
34607  switch (Py_SIZE(x)) {
34608  case 0: return (long) 0;
34609  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
34610  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
34611  case -2:
34612  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
34613  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34614  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34615  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34616  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34617  }
34618  }
34619  break;
34620  case 2:
34621  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
34622  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
34623  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34624  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34625  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34626  }
34627  }
34628  break;
34629  case -3:
34630  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
34631  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34632  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34633  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34634  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34635  }
34636  }
34637  break;
34638  case 3:
34639  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
34640  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
34641  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34642  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34643  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34644  }
34645  }
34646  break;
34647  case -4:
34648  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
34649  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34650  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34651  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
34652  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34653  }
34654  }
34655  break;
34656  case 4:
34657  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
34658  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
34659  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
34660  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
34661  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
34662  }
34663  }
34664  break;
34665  }
34666 #endif
34667  if (sizeof(long) <= sizeof(long)) {
34668  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
34669 #ifdef HAVE_LONG_LONG
34670  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
34671  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
34672 #endif
34673  }
34674  }
34675  {
34676 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
34677  PyErr_SetString(PyExc_RuntimeError,
34678  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
34679 #else
34680  long val;
34681  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
34682  #if PY_MAJOR_VERSION < 3
34683  if (likely(v) && !PyLong_Check(v)) {
34684  PyObject *tmp = v;
34685  v = PyNumber_Long(tmp);
34686  Py_DECREF(tmp);
34687  }
34688  #endif
34689  if (likely(v)) {
34690  int one = 1; int is_little = (int)*(unsigned char *)&one;
34691  unsigned char *bytes = (unsigned char *)&val;
34692  int ret = _PyLong_AsByteArray((PyLongObject *)v,
34693  bytes, sizeof(val),
34694  is_little, !is_unsigned);
34695  Py_DECREF(v);
34696  if (likely(!ret))
34697  return val;
34698  }
34699 #endif
34700  return (long) -1;
34701  }
34702  } else {
34703  long val;
34704  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
34705  if (!tmp) return (long) -1;
34706  val = __Pyx_PyInt_As_long(tmp);
34707  Py_DECREF(tmp);
34708  return val;
34709  }
34710 raise_overflow:
34711  PyErr_SetString(PyExc_OverflowError,
34712  "value too large to convert to long");
34713  return (long) -1;
34714 raise_neg_overflow:
34715  PyErr_SetString(PyExc_OverflowError,
34716  "can't convert negative value to long");
34717  return (long) -1;
34718 }
34719 
34720 /* CheckBinaryVersion */
34721  static int __Pyx_check_binary_version(void) {
34722  char ctversion[4], rtversion[4];
34723  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
34724  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
34725  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
34726  char message[200];
34727  PyOS_snprintf(message, sizeof(message),
34728  "compiletime version %s of module '%.100s' "
34729  "does not match runtime version %s",
34730  ctversion, __Pyx_MODULE_NAME, rtversion);
34731  return PyErr_WarnEx(NULL, message, 1);
34732  }
34733  return 0;
34734 }
34735 
34736 /* ModuleImport */
34737  #ifndef __PYX_HAVE_RT_ImportModule
34738 #define __PYX_HAVE_RT_ImportModule
34739 static PyObject *__Pyx_ImportModule(const char *name) {
34740  PyObject *py_name = 0;
34741  PyObject *py_module = 0;
34742  py_name = __Pyx_PyIdentifier_FromString(name);
34743  if (!py_name)
34744  goto bad;
34745  py_module = PyImport_Import(py_name);
34746  Py_DECREF(py_name);
34747  return py_module;
34748 bad:
34749  Py_XDECREF(py_name);
34750  return 0;
34751 }
34752 #endif
34753 
34754 /* TypeImport */
34755  #ifndef __PYX_HAVE_RT_ImportType
34756 #define __PYX_HAVE_RT_ImportType
34757 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
34758  size_t size, int strict)
34759 {
34760  PyObject *py_module = 0;
34761  PyObject *result = 0;
34762  PyObject *py_name = 0;
34763  char warning[200];
34764  Py_ssize_t basicsize;
34765 #ifdef Py_LIMITED_API
34766  PyObject *py_basicsize;
34767 #endif
34768  py_module = __Pyx_ImportModule(module_name);
34769  if (!py_module)
34770  goto bad;
34771  py_name = __Pyx_PyIdentifier_FromString(class_name);
34772  if (!py_name)
34773  goto bad;
34774  result = PyObject_GetAttr(py_module, py_name);
34775  Py_DECREF(py_name);
34776  py_name = 0;
34777  Py_DECREF(py_module);
34778  py_module = 0;
34779  if (!result)
34780  goto bad;
34781  if (!PyType_Check(result)) {
34782  PyErr_Format(PyExc_TypeError,
34783  "%.200s.%.200s is not a type object",
34784  module_name, class_name);
34785  goto bad;
34786  }
34787 #ifndef Py_LIMITED_API
34788  basicsize = ((PyTypeObject *)result)->tp_basicsize;
34789 #else
34790  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
34791  if (!py_basicsize)
34792  goto bad;
34793  basicsize = PyLong_AsSsize_t(py_basicsize);
34794  Py_DECREF(py_basicsize);
34795  py_basicsize = 0;
34796  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
34797  goto bad;
34798 #endif
34799  if (!strict && (size_t)basicsize > size) {
34800  PyOS_snprintf(warning, sizeof(warning),
34801  "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
34802  module_name, class_name, basicsize, size);
34803  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
34804  }
34805  else if ((size_t)basicsize != size) {
34806  PyErr_Format(PyExc_ValueError,
34807  "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
34808  module_name, class_name, basicsize, size);
34809  goto bad;
34810  }
34811  return (PyTypeObject *)result;
34812 bad:
34813  Py_XDECREF(py_module);
34814  Py_XDECREF(result);
34815  return NULL;
34816 }
34817 #endif
34818 
34819 /* InitStrings */
34820  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
34821  while (t->p) {
34822  #if PY_MAJOR_VERSION < 3
34823  if (t->is_unicode) {
34824  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
34825  } else if (t->intern) {
34826  *t->p = PyString_InternFromString(t->s);
34827  } else {
34828  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
34829  }
34830  #else
34831  if (t->is_unicode | t->is_str) {
34832  if (t->intern) {
34833  *t->p = PyUnicode_InternFromString(t->s);
34834  } else if (t->encoding) {
34835  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
34836  } else {
34837  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
34838  }
34839  } else {
34840  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
34841  }
34842  #endif
34843  if (!*t->p)
34844  return -1;
34845  ++t;
34846  }
34847  return 0;
34848 }
34849 
34850 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
34851  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
34852 }
34853 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
34854  Py_ssize_t ignore;
34855  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
34856 }
34857 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
34858 #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
34859  if (
34860 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34861  __Pyx_sys_getdefaultencoding_not_ascii &&
34862 #endif
34863  PyUnicode_Check(o)) {
34864 #if PY_VERSION_HEX < 0x03030000
34865  char* defenc_c;
34866  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
34867  if (!defenc) return NULL;
34868  defenc_c = PyBytes_AS_STRING(defenc);
34869 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34870  {
34871  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
34872  char* c;
34873  for (c = defenc_c; c < end; c++) {
34874  if ((unsigned char) (*c) >= 128) {
34875  PyUnicode_AsASCIIString(o);
34876  return NULL;
34877  }
34878  }
34879  }
34880 #endif
34881  *length = PyBytes_GET_SIZE(defenc);
34882  return defenc_c;
34883 #else
34884  if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
34885 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34886  if (PyUnicode_IS_ASCII(o)) {
34887  *length = PyUnicode_GET_LENGTH(o);
34888  return PyUnicode_AsUTF8(o);
34889  } else {
34890  PyUnicode_AsASCIIString(o);
34891  return NULL;
34892  }
34893 #else
34894  return PyUnicode_AsUTF8AndSize(o, length);
34895 #endif
34896 #endif
34897  } else
34898 #endif
34899 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
34900  if (PyByteArray_Check(o)) {
34901  *length = PyByteArray_GET_SIZE(o);
34902  return PyByteArray_AS_STRING(o);
34903  } else
34904 #endif
34905  {
34906  char* result;
34907  int r = PyBytes_AsStringAndSize(o, &result, length);
34908  if (unlikely(r < 0)) {
34909  return NULL;
34910  } else {
34911  return result;
34912  }
34913  }
34914 }
34915 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
34916  int is_true = x == Py_True;
34917  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
34918  else return PyObject_IsTrue(x);
34919 }
34920 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
34921 #if CYTHON_USE_TYPE_SLOTS
34922  PyNumberMethods *m;
34923 #endif
34924  const char *name = NULL;
34925  PyObject *res = NULL;
34926 #if PY_MAJOR_VERSION < 3
34927  if (PyInt_Check(x) || PyLong_Check(x))
34928 #else
34929  if (PyLong_Check(x))
34930 #endif
34931  return __Pyx_NewRef(x);
34932 #if CYTHON_USE_TYPE_SLOTS
34933  m = Py_TYPE(x)->tp_as_number;
34934  #if PY_MAJOR_VERSION < 3
34935  if (m && m->nb_int) {
34936  name = "int";
34937  res = PyNumber_Int(x);
34938  }
34939  else if (m && m->nb_long) {
34940  name = "long";
34941  res = PyNumber_Long(x);
34942  }
34943  #else
34944  if (m && m->nb_int) {
34945  name = "int";
34946  res = PyNumber_Long(x);
34947  }
34948  #endif
34949 #else
34950  res = PyNumber_Int(x);
34951 #endif
34952  if (res) {
34953 #if PY_MAJOR_VERSION < 3
34954  if (!PyInt_Check(res) && !PyLong_Check(res)) {
34955 #else
34956  if (!PyLong_Check(res)) {
34957 #endif
34958  PyErr_Format(PyExc_TypeError,
34959  "__%.4s__ returned non-%.4s (type %.200s)",
34960  name, name, Py_TYPE(res)->tp_name);
34961  Py_DECREF(res);
34962  return NULL;
34963  }
34964  }
34965  else if (!PyErr_Occurred()) {
34966  PyErr_SetString(PyExc_TypeError,
34967  "an integer is required");
34968  }
34969  return res;
34970 }
34971 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
34972  Py_ssize_t ival;
34973  PyObject *x;
34974 #if PY_MAJOR_VERSION < 3
34975  if (likely(PyInt_CheckExact(b))) {
34976  if (sizeof(Py_ssize_t) >= sizeof(long))
34977  return PyInt_AS_LONG(b);
34978  else
34979  return PyInt_AsSsize_t(x);
34980  }
34981 #endif
34982  if (likely(PyLong_CheckExact(b))) {
34983  #if CYTHON_USE_PYLONG_INTERNALS
34984  const digit* digits = ((PyLongObject*)b)->ob_digit;
34985  const Py_ssize_t size = Py_SIZE(b);
34986  if (likely(__Pyx_sst_abs(size) <= 1)) {
34987  ival = likely(size) ? digits[0] : 0;
34988  if (size == -1) ival = -ival;
34989  return ival;
34990  } else {
34991  switch (size) {
34992  case 2:
34993  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34994  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34995  }
34996  break;
34997  case -2:
34998  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34999  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35000  }
35001  break;
35002  case 3:
35003  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
35004  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35005  }
35006  break;
35007  case -3:
35008  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
35009  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35010  }
35011  break;
35012  case 4:
35013  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
35014  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35015  }
35016  break;
35017  case -4:
35018  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
35019  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
35020  }
35021  break;
35022  }
35023  }
35024  #endif
35025  return PyLong_AsSsize_t(b);
35026  }
35027  x = PyNumber_Index(b);
35028  if (!x) return -1;
35029  ival = PyInt_AsSsize_t(x);
35030  Py_DECREF(x);
35031  return ival;
35032 }
35033 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
35034  return PyInt_FromSize_t(ival);
35035 }
35036 
35037 
35038 #endif /* Py_PYTHON_H */
double f(double C, double b, double a, int q, int r)
cppADR_base * newADR(int nSpaceIn, int nQuadraturePoints_elementIn, int nDOF_mesh_trial_elementIn, int nDOF_trial_elementIn, int nDOF_test_elementIn, int nQuadraturePoints_elementBoundaryIn, int CompKernelFlag)
Definition: ADR.h:1379
#define PyMODINIT_FUNC